tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Panthen <...@unitb-consulting.de>
Subject jsp compilation fails depending on how WEB-INF classes are build
Date Mon, 08 Feb 2010 13:29:30 GMT
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.ClassFormatException
      at 
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:342)


      at 
org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:206)
      at 
org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:178)
      at 
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:122)


      at 
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178)


      at 
org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2101)
      at 
org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:69)


      at 
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:134) 

      at 
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1273)


      at 
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:604)


      at 
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:582)


      at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.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(JDTCompiler.java:429)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
      at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589) 

      at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) 

      at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.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.internalDoFilter(ApplicationFilterChain.java:290)


      at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


      at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 

      at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 

      at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 

      at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 

      at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 

      at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)


      at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.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.

Any hint towards what might be the problem here is greatly appreciated.

Thanks a lot,

fabian

-- 

____________________________________________

u n i t b  c o n s u l t i n g



Brunnenstr. 156

10115 Berlin



Tel:    +49 [0]30 44 31 92 00

Fax:    +49 [0]30 44 31 92 29

Mail:   office@unitb-consulting.de

Web:    http://www.unitb-consulting.de



Geschäftsführer: Nico Adam, Thomas Timm

Registergericht: AG Berlin-Charlottenburg - HRB 113607

Steuernummer: 37/249/21073

Ust-IdNr.: DE814984825



Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen

enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail

irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und

vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte

Weitergabe dieser Mail sind nicht gestattet.



This e-mail may contain confidential and/or privileged information. If you

are not the intended recipient (or have received this e-mail in error)

please notify the sender immediately and destroy this e-mail. Any

unauthorised copying, disclosure or distribution of the material in this

e-mail is strictly forbidden.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message