jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schuerig <mich...@schuerig.de>
Subject Tomcat 5.5.1: ClassFormatError while loading org/apache/cactus/util/log/LogAspect
Date Sun, 12 Sep 2004 22:22:00 GMT

This is my first attempt at getting cactus to work, thus I may be 
missing something rather obvious. I'm trying to run the sample servlet 
test provided with cactus 1.6.1 (version for JDK 1.3) on Tomcat 5.5.1 
using JDK 1.5RC. I compiled the sample source with source="1.3" and 
target="1.3".

After clearing some hurdles, I at least got the ant target to start up 
Tomcat. The default file installed 
as /tmp/cactus/tomcat5x/conf/server.xml should not set the class 
attribute in the Connector element.

When Tomcat starts, though, it stumbles over a ClassFormatError in 
org/apache/cactus/util/log/LogAspect (see below). The offending class 
is an "aspect"; supposedly, AspectJ compiles aspect code to ordinary 
java class files, but apparently the classloader dissents in this case.

Afterward, I've tried to run the tests using JDK 1.4.2 and Tomcat 5.0.27 
and there they work.

Michael


target/test-reports/tomcat5x.out:

12.09.2004 23:30:00 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12.09.2004 23:30:00 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 846 ms
12.09.2004 23:30:00 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12.09.2004 23:30:00 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.1
12.09.2004 23:30:00 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
12.09.2004 23:30:00 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive 
cactus-sample-servlet-cactified.war
12.09.2004 23:30:02 org.apache.catalina.realm.JAASRealm setContainer
INFO: Setting JAAS app name Catalina
Can't find resource org.apache.catalina.servlets.LocalStrings 
WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@ece65

[Ljava.net.URL;@1aa57fb
12.09.2004 23:30:02 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12.09.2004 23:30:02 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2264 ms
12.09.2004 23:30:03 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet ServletRedirector threw 
exception
java.lang.ClassFormatError: Invalid index 0 in LocalVariableTable in 
class file org/apache/cactus/util/log/LogAspect
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1631)
        at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:855)
        at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1304)
        at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1186)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at 
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        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.StandardContextValve.invoke(StandardContextValve.java:178)
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:106)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        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:576)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

-- 
Michael Schuerig           Contests between male toads over females are
mailto:michael@schuerig.de     often settled by the depth of the croak.
http://www.schuerig.de/michael/                    --John Maynard Smith

Mime
View raw message