Hi, What�s the code at line 22 of TestSampleServlet.java? As Mallinath said, the problem is that you've compiled your code (in your IDE probably) with one version of a jar (which had the API at line 22 of your code) and you're trying to execute it with a different version of the jar which does not support the API from line 22 of your code.
-Vincent -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 09 June 2004 21:46 To: Cactus Users List Subject: RE: Newbie - IncompatibleClassChangeError Weird. I created a whole new instance of Tomcat 4.1.24 from Apache, setup my catalina_home variable, started up tomcat and all is well. Then, I added junit-3.8.1.jar, cactus-1.6.1.jar, aspectjrt-1.1.1.jar and commons-httpclient-2.0.jar. Next, I restarted Tomcat, then tried http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet and I still get the same error. Also, I just download the .class files for SampleServlet.class and TestSampleServlet.class from the Apache site and put them in <tomcat home>\webapps\test\WEB-INF\classes. There are jar files in <tomcat home>\lib and <tomcat home>\server\lib. "Mallinath Suralikal (C)" <[EMAIL PROTECTED]> "Mallinath Suralikal (C)" <[EMAIL PROTECTED]> 06/09/2004 12:51 PM Please respond to "Cactus Users List" <[EMAIL PROTECTED]> To Cactus Users List <[EMAIL PROTECTED]> cc Subject RE: Newbie - IncompatibleClassChangeError This problem occur when you compiling against one set of jars and running with a different set of jars, or that you have multiple versions of some jar being loaded in your application. Thanks Malli -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: Newbie - IncompatibleClassChangeError Hi, I'm new to Cactus. Looks like a good product, btw. I'm using: Tomcat 4.1 JDK1.4.1 Windows2000 I followed the instructions from http://jakarta.apache.org/cactus/integration/howto_tomcat.html. When I invoke http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet, I get the following: <testsuites> -<testsuite name="TestSampleServlet" tests="1" failures="0" errors="1" time="0"> -<testcase name="testSaveToSessionOK" time="0"> -<error message="null" type="java.lang.IncompatibleClassChangeError"> java.lang.IncompatibleClassChangeError � � �at TestSampleServlet.beginSaveToSessionOK(TestSampleServlet.java:22) � � �at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) � � �at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39 ) � � �at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl .java:25) � � �at org.apache.cactus.internal.client.ClientTestCaseCaller.callGenericBeginM etho d(ClientTestCaseCaller.java:358) � � �at org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_a roun dBody0(ClientTestCaseCaller.java:192) � � �at org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_a roun dBody1$advice(ClientTestCaseCaller.java:124) � � �at org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod(C lien tTestCaseCaller.java) � � �at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTes tCas eCaller.java:141) � � �at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(Abstract Cact usTestCase.java:215) � � �at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactus Test Case.java:133) � � �at org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner. java :315) � � �at org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Serv letT estRunner.java:193) � � �at org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advi ce(S ervletTestRunner.java:124) � � �at org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne r.ja va) � � �at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) � � �at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) � � �at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:247) � � �at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:193) � � �at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:260) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) � � �at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) � � �at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) � � �at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:191) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) � � �at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) � � �at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) � � �at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239 6) � � �at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180 ) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) � � �at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve. java:170) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:641) � � �at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172 ) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:641) � � �at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) � � �at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) � � �at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java :174) � � �at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipeline.java:643) � � �at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) � � �at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) � � �at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) � � �at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40 5) � � �at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onne ction(Http11Protocol.java:380) � � �at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50 8) � � �at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable. run(ThreadPool.java:533) � � �at java.lang.Thread.run(Thread.java:536) </error> </testcase> </testsuite> </testsuites> The instructions didn't say anything about the web.xml that sits underneath /webapps/test/WEB-INF. My web.xml has this: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app � �PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" � �"http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> �<display-name>Welcome to Tomcat</display-name> �<description> � � Welcome to Tomcat �</description> </web-app> Any ideas of what I may have missed? Thanks, Kevin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
