jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pujari, Ashis" <ashis.puj...@cbm.com>
Subject Exception in constructor: testSaveToSessionOK
Date Sat, 03 Jan 2004 19:39:12 GMT

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 

Mime
View raw message