2010-04-05 113 views
7

在我的servlet中,使用Tomcat 5.0和JRE的版本是1.5.0,但是當我單擊URL時發生錯誤。 當我創建我的項目的戰爭文件,並部署在tomcat比它工作正常。這意味着,只用我的Eclipse配置啓動現代編譯器時出錯

誤差問題: -

Apr 5, 2010 3:20:22 PM org.apache.jasper.compiler.Compiler generateClass 
SEVERE: Javac exception 
Error starting modern compiler 
    at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:69) 
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942) 
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) 
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) 
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) 
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) 
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) 
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) 
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) 
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:61) 
    ... 35 more 
Caused by: java.lang.VerifyError: class com.sun.tools.javac.jvm.Target overrides final method . 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(Unknown Source) 
    at java.security.SecureClassLoader.defineClass(Unknown Source) 
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) 
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) 
    at java.lang.ClassLoader.loadClassInternal(Unknown Source) 
    at com.sun.tools.javac.Main.compile(Main.java:42) 
    ... 40 more 
--- Nested Exception --- 
java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:61) 
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942) 
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) 
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) 
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) 
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) 
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) 
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) 
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) 
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) 
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: java.lang.VerifyError: class com.sun.tools.javac.jvm.Target overrides final method . 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(Unknown Source) 
    at java.security.SecureClassLoader.defineClass(Unknown Source) 
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) 
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) 
    at java.lang.ClassLoader.loadClassInternal(Unknown Source) 
    at com.sun.tools.javac.Main.compile(Main.java:42) 
    ... 40 more 
Apr 5, 2010 3:20:22 PM org.apache.jasper.compiler.Compiler generateClass 
SEVERE: Env: Compile: javaFileName=/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/SampleSaloni//org/apache/jsp/page\form_jsp.java 
    classpath=/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/classes/;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/ant-launcher.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/ant.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-collections-3.1.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-dbcp-1.2.1.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-el.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-pool-1.2.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jasper-compiler.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jasper-runtime.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jsp-api.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-common.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-factory.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-java.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-resources.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/tools.jar;D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\SampleSaloni;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/classes/;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/ant-launcher.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/ant.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-collections-3.1.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-dbcp-1.2.1.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-el.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/commons-pool-1.2.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jasper-compiler.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jasper-runtime.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/jsp-api.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-common.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-factory.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-java.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/naming-resources.jar;/D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SampleSaloni/WEB-INF/lib/tools.jar;D:/software setups/jakarta-tomcat-5.0.28/common/classes/;D:/software setups/jakarta-tomcat-5.0.28/common/lib/ant-launcher.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/ant.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/commons-collections-3.1.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/commons-dbcp-1.2.1.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/commons-el.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/commons-pool-1.2.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/jasper-compiler.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/jasper-runtime.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/jsp-api.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/naming-common.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/naming-factory.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/naming-java.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/naming-resources.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/servlet-api.jar;D:/software setups/jakarta-tomcat-5.0.28/common/lib/tools.jar;/D:/software%20setups/jakarta-tomcat-5.0.28/bin/bootstrap.jar;/C:/Program%20Files/Java/jre1.5.0_09/lib/ext/dnsns.jar;/C:/Program%20Files/Java/jre1.5.0_09/lib/ext/sunjce_provider.jar;/C:/Program%20Files/Java/jre1.5.0_09/lib/ext/sunpkcs11.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\bin\bootstrap.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\classes 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\ant-launcher.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\ant.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-collections-3.1.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-dbcp-1.2.1.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-el.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-pool-1.2.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jasper-compiler.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jasper-runtime.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jsp-api.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-common.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-factory.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-java.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-resources.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\tools.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\SampleSaloni 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\classes 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\ant-launcher.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\ant.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-collections-3.1.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-dbcp-1.2.1.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-el.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\commons-pool-1.2.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jasper-compiler.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jasper-runtime.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\jsp-api.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-common.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-factory.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-java.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\naming-resources.jar 
    cp=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\SampleSaloni\WEB-INF\lib\tools.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\classes 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\ant-launcher.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\ant.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\commons-collections-3.1.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\commons-dbcp-1.2.1.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\commons-el.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\commons-pool-1.2.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\jasper-compiler.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\jasper-runtime.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\jsp-api.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\naming-common.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\naming-factory.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\naming-java.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\naming-resources.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar 
    cp=D:\software setups\jakarta-tomcat-5.0.28\common\lib\tools.jar 
    cp=D:\software%20setups\jakarta-tomcat-5.0.28\bin\bootstrap.jar 
    cp=C:\Program%20Files\Java\jre1.5.0_09\lib\ext\dnsns.jar 
    cp=C:\Program%20Files\Java\jre1.5.0_09\lib\ext\sunjce_provider.jar 
    cp=C:\Program%20Files\Java\jre1.5.0_09\lib\ext\sunpkcs11.jar 
    work dir=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\SampleSaloni 
    extension dir=C:\Program Files\Java\jre1.5.0_09\lib\ext 
    srcDir=D:\OffViv\JAVA_IDE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\SampleSaloni 
    include=org/apache/jsp/page/form_jsp.java 

Apr 5, 2010 3:20:22 PM org.apache.jasper.compiler.Compiler generateClass 
SEVERE: Error compiling file: /D:/OffViv/JAVA_IDE/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/SampleSaloni//org/apache/jsp/page\form_jsp.java  [javac] Compiling 1 source file 
+2

以供將來參考,您應該格式化控制檯輸出代碼(縮進四個空格,或者只是選擇並點擊編輯窗口上方的「101/010」圖標)。在這種情況下,我已經爲你做了這件事。 – 2010-04-05 10:03:07

回答

4

錯誤消息顯示在堆棧跟蹤:

Caused by: java.lang.VerifyError: class com.sun.tools.javac.jvm.Target overrides final method . 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(Unknown Source) 
    at java.security.SecureClassLoader.defineClass(Unknown Source) 
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) 

的問題是,你的「的javac」是與運行時不兼容,可能是因爲您正在運行JVM已加載的另一個Java編譯器。

0

如果你正在使用MyEclipse(不清楚),也許看看這個blog post。基本上,您可能需要將Tomcat使用的VM與Eclipse內部使用的VM對齊。

+0

我做了鏈接中給出的變化,但仍然。我得到相同的錯誤。 – saloni 2010-04-05 12:10:02

+0

告訴我們您的tomcat正在使用哪個jvm,然後告訴我們您的MyEclipse正在使用哪個jvm。 – John 2010-04-06 12:52:58

+0

我的問題解決了。我使用錯誤的JRE。謝謝 – saloni 2010-04-07 10:47:18

0

注意的以下內容:

CP = d:\軟件設置\雅加達Tomcat的5.0.28 \ common \ lib文件\命名-resources.jar

CP = d:\軟件設置\雅加達Tomcat的5.0.28 \ common \ lib文件\ servlet的api.jar文件

CP = d:\軟件設置\雅加達Tomcat的5.0.28 \ common \ lib文件\的tools.jar

cp = D:\ software%20setups \ jakarta-tomc在-5.0.28 \ BIN \ bootstrap.jar

CP = C:\ PROGRAM%20Files \的Java \ jre1.5.0_09 \ lib中\分機\ dnsns.jar

的的VerifyError表示版本被調用的javac編譯器與您的JDK不兼容。我的猜測是,先前/後來的JDK版本中的tools.jar被複制到了Tomcat的common/lib目錄中,common/lib中的tools.jar與當前的JDK衝突。

我不知道爲什麼too​​ls.jar存在於你的common/lib目錄下,那裏不需要它。 (也許它是爲了能夠使用JRE而不是JDK運行Tomcat)

要麼將​​其取出,要麼將其從當前正在使用的JDK中複製出來, Tomcat在這個之上。

5

傢伙您好我也得到同樣的問題,同時運行以下

「Ant構建」,因爲我不知道這個詞的「錯誤啓動現代編譯」,所以我運行的命令與verbos日誌選項,也就是「螞蟻-v構建」,最後得到的是‘內存不足錯誤Ant構建‘問題’,因此將請增加JRE內存

所以請申請 集ANT_OPTS = -Xms256m -Xmx256m

,然後運行之前’將解決問題

0

我在使用IntelliJ Idea IDE中的ANT構建項目時遇到過類似的問題。 升級您的JDK版本..我使用jdk1.7.0_51並將其升級到jdk1.7.0_65它工作。

希望它可以幫助

乾杯

0

這是由於內存問題。請增加內存大小:

ANT_OPTS="-Xms512M -Xmx1024M" 

希望這會有所幫助。