You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Pujari, Ashis" <as...@cbm.com> on 2004/01/03 20:39:12 UTC
Exception in constructor: testSaveToSessionOK
Hi,
I tired to use the testcase -> TestSampleServlet given as example on
Cactus website. Added the following jars to my web application running
on jboss-3.2.1_tomcat 4.1.24:
aspectjrt-1.1.1.jar
cactus-1.5.jar
cactus-ant-1.5.jar
commons-httpclient-2.0-rc2.jar
commons-logging-1.0.3.jar
httpunit-1.5.3.jar
junit-3.8.1.jar
nekohtml-0.7.4.jar
servletapi-2.3.jar
I compiled the file TestCase using these jars.
But on accessing the URL
http://localhost:8080/ashtest/ServletTestRunner?suite=com.ash.test.TestS
ampleServlet I am getting the exception below. I do not have any older
versions of junit. Any solutions ?
Thanks
Ashis
========================================================================
==
<?xml version="1.0" encoding="UTF-8" ?>
- <testsuites>
- <testsuite name="com.ash.test.TestSampleServlet" tests="1"
failures="1" errors="0" time="0">
- <testcase name="warning" time="0">
<failure message="Exception in constructor: testSaveToSessionOK
(java.lang.NoClassDefFoundError at
org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188) at
org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164) at
com.ash.test.TestSampleServlet.<init>(TestSampleServlet.java:13) at
java.lang.reflect.Constructor.newInstance(Native Method) at
junit.framework.TestSuite.createTest(TestSuite.java:135) at
junit.framework.TestSuite.addTestMethod(TestSuite.java:114) at
junit.framework.TestSuite.<init>(TestSuite.java:75) at
com.ash.test.TestSampleServlet.suite(TestSampleServlet.java:18) at
java.lang.reflect.Method.invoke(Native Method) at
junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:111) at
Re: Exception in constructor: testSaveToSessionOK
Posted by Martin Gainty <mg...@hotmail.com>.
is TestSampleServlet.class is on your classpath?
-Martin
----- Original Message -----
From: "Pujari, Ashis" <as...@cbm.com>
To: <ca...@jakarta.apache.org>
Sent: Saturday, January 03, 2004 2:39 PM
Subject: Exception in constructor: testSaveToSessionOK
Hi,
I tired to use the testcase -> TestSampleServlet given as example on
Cactus website. Added the following jars to my web application running
on jboss-3.2.1_tomcat 4.1.24:
aspectjrt-1.1.1.jar
cactus-1.5.jar
cactus-ant-1.5.jar
commons-httpclient-2.0-rc2.jar
commons-logging-1.0.3.jar
httpunit-1.5.3.jar
junit-3.8.1.jar
nekohtml-0.7.4.jar
servletapi-2.3.jar
I compiled the file TestCase using these jars.
But on accessing the URL
http://localhost:8080/ashtest/ServletTestRunner?suite=com.ash.test.TestS
ampleServlet I am getting the exception below. I do not have any older
versions of junit. Any solutions ?
Thanks
Ashis
========================================================================
==
<?xml version="1.0" encoding="UTF-8" ?>
- <testsuites>
- <testsuite name="com.ash.test.TestSampleServlet" tests="1"
failures="1" errors="0" time="0">
- <testcase name="warning" time="0">
<failure message="Exception in constructor: testSaveToSessionOK
(java.lang.NoClassDefFoundError at
org.apache.cactus.ServletTestCase.init(ServletTestCase.java:188) at
org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:164) at
com.ash.test.TestSampleServlet.<init>(TestSampleServlet.java:13) at
java.lang.reflect.Constructor.newInstance(Native Method) at
junit.framework.TestSuite.createTest(TestSuite.java:135) at
junit.framework.TestSuite.addTestMethod(TestSuite.java:114) at
junit.framework.TestSuite.<init>(TestSuite.java:75) at
com.ash.test.TestSampleServlet.suite(TestSampleServlet.java:18) at
java.lang.reflect.Method.invoke(Native Method) at
junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:111) at
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org