我在Windows 8.1上编译openg时遇到问题 我已经关注了OpenGTS安装和配置pdf,但仍然没有运气 我正在使用
java:jdk1.7.0_45 ant:apache-ant-1.9.3 tomcat:tomcat 8 mysql:mysql5.5.20 MySQL的连接器的Java-5.1.28-bin.jar javax.mail.jar
我已经配置了JAVA_HOME,GTS_HOME,CATALINA_HOME,MYSQL_HOME,ANT_HOME
并将它们添加到路径变量
任何帮助表示赞赏。 感谢
Buildfile: E:\java\projects\opengts\build.xml
clean:
[delete] Deleting directory E:\java\projects\opengts\build
custom.jar:
[echo] Skipping General Custom build ...
customtrack.jar:
[echo] Skipping Track Custom build ...
custom:
prepare:
[mkdir] Created dir: E:\java\projects\opengts\build
[mkdir] Created dir: E:\java\projects\opengts\build\lib
[echo] OS = Windows 8
[echo] JavaHome = C:\Program Files\Java\jre7
[exec] java version "1.7.0_45"
[exec] Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
[exec] Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
[copy] Copying 2 files to E:\java\projects\opengts\build\lib
[echo] (Ignore copy 'not found' warnings)
[copy] Warning: E:\java\projects\opengts\lib\gtsopt\classes does not exist.
gtsutils.compile:
[echo] Compiling gtsutils.jar source ...
[javac] Compiling 62 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: E:\java\projects\opengts\src\org\opengts\util\OSTools.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\util\package- info.class
[echo] Compiling SendMailArgs.java (optional if 'mail.jar' not available) ...
[javac] Compiling 1 source file to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:37: error: package javax.mail does not exist
[javac] import javax.mail.*;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:38: error: package javax.mail.internet does not exist
[javac] import javax.mail.internet.*;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:365: error: cannot find symbol
[javac] private static InternetAddress[] _convertRecipients(String to[])
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:366: error: cannot find symbol
[javac] throws AddressException
[javac] ^
[javac] symbol: class AddressException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:400: error: cannot find symbol
[javac] private static void _printAddresses(String msg, Address addr[])
[javac] ^
[javac] symbol: class Address
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:167: error: cannot find symbol
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:167: error: cannot find symbol
[javac] InternetAddress ia = new InternetAddress(addr, true);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:266: error: package javax.mail does not exist
[javac] javax.mail.Authenticator auth = null;
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:268: error: package javax.mail does not exist
[javac] auth = new javax.mail.Authenticator() {
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:279: error: cannot find symbol
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] symbol: class Session
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:279: error: cannot find symbol
[javac] Session session = Session.getInstance(props, auth);
[javac] ^
[javac] symbol: variable Session
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:282: error: cannot find symbol
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] symbol: class MimeMessage
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:282: error: cannot find symbol
[javac] MimeMessage msg = new MimeMessage(session);
[javac] ^
[javac] symbol: class MimeMessage
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:283: error: cannot find symbol
[javac] msg.setFrom(new InternetAddress(from));
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:285: error: cannot find symbol
[javac] InternetAddress toAddr[] = _convertRecipients(to);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:286: error: cannot find symbol
[javac] InternetAddress ccAddr[] = _convertRecipients(cc);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:287: error: cannot find symbol
[javac] InternetAddress bccAddr[] = _convertRecipients(bcc);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:296: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.TO , toAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:297: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.CC , ccAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:298: error: package Message does not exist
[javac] msg.setRecipients(Message.RecipientType.BCC, bccAddr);
[javac] ^
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:302: error: cannot find symbol
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] symbol: class Multipart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:302: error: cannot find symbol
[javac] Multipart multipart = new MimeMultipart();
[javac] ^
[javac] symbol: class MimeMultipart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:304: error: cannot find symbol
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:304: error: cannot find symbol
[javac] MimeBodyPart textBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:309: error: cannot find symbol
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class BodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:309: error: cannot find symbol
[javac] BodyPart attachBodyPart = new MimeBodyPart();
[javac] ^
[javac] symbol: class MimeBodyPart
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:324: error: cannot find symbol
[javac] Transport transport = session.getTransport("smtp");
[javac] ^
[javac] symbol: class Transport
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:329: error: cannot find symbol
[javac] Transport.send(msg);
[javac] ^
[javac] symbol: variable Transport
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:338: error: cannot find symbol
[javac] } catch (MessagingException me) {
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:342: error: cannot find symbol
[javac] if (ex instanceof SendFailedException) {
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:343: error: cannot find symbol
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:343: error: cannot find symbol
[javac] SendFailedException sfex = (SendFailedException)ex;
[javac] ^
[javac] symbol: class SendFailedException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:348: error: cannot find symbol
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:348: error: cannot find symbol
[javac] ex = (ex instanceof MessagingException)? ((MessagingException)ex).getNextException() : null;
[javac] ^
[javac] symbol: class MessagingException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:368: error: cannot find symbol
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:368: error: cannot find symbol
[javac] java.util.List<InternetAddress> inetAddr = new Vector<InternetAddress>();
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:386: error: cannot find symbol
[javac] inetAddr.add(new InternetAddress(t));
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:387: error: cannot find symbol
[javac] } catch (AddressException ae) {
[javac] ^
[javac] symbol: class AddressException
[javac] location: class SendMailArgs
[javac] E:\java\projects\opengts\src\org\opengts\util\SendMailArgs.java:392: error: cannot find symbol
[javac] return inetAddr.toArray(new InternetAddress[inetAddr.size()]);
[javac] ^
[javac] symbol: class InternetAddress
[javac] location: class SendMailArgs
[javac] 39 errors
[javac] 1 warning
[javac] Compile failed; see the compiler error output for details.
[echo] Compiling dbtools ...
[javac] Compiling 24 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: E:\java\projects\opengts\src\org\opengts\dbtools\DBAdmin.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\dbtools\package- info.class
gtsutils.exceltools:
gtsutils.sigHandler:
gtsutils.optional:
gtsutils.jar:
[echo] Creating gtsutils.jar ...
[copy] Copying 14 files to E:\java\projects\opengts\build
[jar] Building jar: E:\java\projects\opengts\build\lib\gtsutils.jar
gtsutils:
CompileTime.java:
[echo] Creating CompileTime module ...
gtsdb:
[echo] Creating gtsdb.jar ...
[javac] Compiling 112 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] 1 warning
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\tinygeocoder\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\tables\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\nominatim\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\dbtypes\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\google\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\geonames\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\dmtp\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\gisgraphy\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\geocoder\package-info.class
[javac] Creating empty E:\java\projects\opengts\build\org\opengts\db\package-info.class
[copy] Copying 45 files to E:\java\projects\opengts\build
[jar] Building jar: E:\java\projects\opengts\build\lib\gtsdb.jar
[copy] Copying 1 file to E:\java\projects\opengts\build\lib
optjars:
tomcat.home:
[echo] 'CATALINA_HOME' is defined - C:\Program Files\tomcat
tomcat.env:
tools:
[echo] Tools ...
[javac] Compiling 4 source files to E:\java\projects\opengts\build
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] E:\java\projects\opengts\src\org\opengts\war\tools\BufferedHttpServletResponse.java:41: error: BufferedServletOutputStream is not abstract and does not override abstract method setWriteListener(WriteListener) in ServletOutputStream
[javac] public static class BufferedServletOutputStream
[javac] ^
[javac] 1 error
[javac] 1 warning
BUILD FAILED
E:\java\projects\opengts\build.xml:2046: Compile failed; see the compiler error output for details.
Total time: 30 seconds
答案 0 :(得分:3)
您是否将JavaMail API放在$ JAVA_HOME / jre / lib / ext /目录中?
而且,这个错误
错误:BufferedServletOutputStream不是抽象的,也不是 在
中覆盖抽象方法setWriteListener(WriteListener) ServletOutputStream的
是因为您使用的是Tomcat8.x,您应该使用Tomcat7.x
答案 1 :(得分:0)
根据错误中的路径,取消注释BufferedServletOutputStream.java第74行中的最后一个方法
setWriteListener(/ * javax.servlert * / WriteListener)
我的意思是删除/ *和* / 即使你使用tomcat 7/8,一切都会正常工作。