jsp compilation fails with ClassFormatException [message #512922] |
Mon, 08 February 2010 06:25  |
Eclipse User |
|
|
|
Hello,
not sure whether here is the right place to post, but i give it a shot...
I have a webapp with JSP's using some classes from WEB-INF/classes in a declaration block (<%!%>),
running in tomcat 6 on jdk1.6.0_14.
The problem is such,
if I compile the classes in WEB-INF/classes using eclipse Galileo everything runs fine.
But if I compile those same classes using ANT, jsp comilation in tomcat fails with the following stack trace:
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatExcept ion
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init >(ClassFileReader.java:342)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompile r.java:206)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompile r.java:178)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.a skForType(LookupEnvironment.java:122)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getT ypeOrPackage(PackageBinding.java:178)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Sc ope.java:2101)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference .getTypeBinding(QualifiedTypeReference.java:69)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveT ype(TypeReference.java:134)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.r esolveTypeFor(SourceTypeBinding.java:1273)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.f ields(SourceTypeBinding.java:604)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.f aultInTypesForFieldsAndMethods(SourceTypeBinding.java:582)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScop e.faultInTypes(CompilationUnitScope.java:431)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler. java:616)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler. java:392)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTComp iler.java:429)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:33 4)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:31 2)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:29 9)
at org.apache.jasper.JspCompilationContext.compile(JspCompilati onContext.java:589)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServl etWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServl et.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java :260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:489)
at java.lang.Thread.run(Thread.java:619)
This happens as well under tomcat 5.5.
Changing the ANT build to use the same JDT compiler as eclipse did not change the problem.
Using javap I checked both compiled versions of the classes and they do have the same major version.
I am using ant 1.7.1 and org.eclipse.jdt.core_3.5.1.v_972_R35x.jar
Any hint towards what might be the problem here is greatly appreciated.
Thanks a lot,
fabian
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02988 seconds