I've implemented your suggestion as well as the one from the Kazuhito. I still get the NCDFE error. However when I try to hit the SevletTestRunner for the first time I get the following error:
java.lang.VerifyError: (class: org/apache/cactus/client/connector/http/HttpClientConnectionHelper, method: addUserData signature: (Lorg/apache/cactus/WebRequest;)V) Incompatible object argument for function call at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.cactus.configuration.BaseConfiguration.<clinit>(BaseConfiguration.java:94) at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188) at org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164)
I read in the mail archives, this error is because all the cactus jar files are not compiled with the same compiler and have different versions. Is it true? If it is how do I get rid of it? When I refresh the page the error changes to the NoClassDefFoundError.
btw. My project structure looks like this now:
TestCactus.jar
com
cactus
TestCactusHome.class
TestCactusBean.class
TestCactus.class
META-INF
jboss.xml
ejb-jar.xmlTestCactus.ear
application.xml
TestCactus.war
WEB-INF
jboss-web.xml
web.xml
lib
log4j-1.2.8.jar
junit-3.8.1.jar
commons-logging-1.0.1.jar
cactus-1.6dev-20031029.jar
commons-httpclient-2.0-rc2
aspectjrt-1.1.1.jar
httpunit-1.5.3
classes
com
cactus
TestCactusHome.class
TestCactusBean.class
TestCactus.class
TestCactusTest.classThanks for your response and please let me know where I'm doing wrong.
Thanks Srikrishna
From: Christopher Lenz <[EMAIL PROTECTED]> Reply-To: "Cactus Users List" <[EMAIL PROTECTED]> To: "Cactus Users List" <[EMAIL PROTECTED]> Subject: Re: Beginner - NoClassDefFoundError Date: Fri, 5 Dec 2003 10:03:54 +0100
Hi Srikrishna,
you need to remove the TestCactus.jar from the EAR, so that the test classes only appear in the web-app. Otherwise the test classes are loaded from a class-loader one level above the class-loader that loads cactus.jar, thus resulting in the NCDFE you're getting.
Hope that helps, Chris -- Christopher Lenz /=/ cmlenz at gmx.de
Am 05.12.2003 um 02:18 schrieb Srikrishna Kalavacharla:Hi All,
I've tried my best to read through the mailing lists and implement all the suggestions, but still I'm getting the same error.
My Error is (java.lang.NoClassDefFoundError at org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188) at org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164) ...
I'm using the eclipse integration from the nightly build area and the plugin is
C:\eclipse\plugins\org.apache.cactus.eclipse.runner_1.6dev-20031029. I'm using JBoss as my application server.
My EAR file has got the following Structure
TestCactus.ear application.xml TestCactus.jar com cactus TestCactusHome.class TestCactusBean.class TestCactus.class META-INF jboss.xml ejb-jar.xml TestCactus.war WEB-INF jboss-web.xml web.xml lib log4j-1.2.8.jar junit-3.8.1.jar commons-logging-1.0.1.jar cactus-1.6dev-20031029.jar aspectjrt-1.1.1.jar classes com cactus TestCactusHome.class TestCactusBean.class TestCactus.class TestCactusTest.class
In the client side I've the following jar files
junit-3.8.1.jar cactus-ant-1.6dev-20031029.jar commons-httpclient-2.0-rc2.jar aspectjrt-1.1.1.jar commons-logging-1.0.3.jar httpunit-1.5.3.jar cactus-1.6dev-20031029.jar
I've the mappings for ServletRedirector and ServletTestRunner in my web.xml. When I try the ServletRedirector page it shows me the blank page and I assume there are no errors in the process. However when I use the ServletTestRunner and call the com.cactus.TestCactusTest class it throws me a class not found error.
Please let me know where I'm doing wrong.
Thanks Srikrishna
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Winterize your home with tips from MSN House & Home. http://special.msn.com/home/warmhome.armx
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
