Hi Fazle, > -----Original Message----- > From: Fazle Khan [mailto:[EMAIL PROTECTED] > Sent: mardi 25 janvier 2005 21:49 > To: [email protected] > Subject: NoClassDefFoundError when running cactified test via JunitEE > > I know this is dealing with tests not working with > another open source project, JunitEE, but I was hoping > someone here might have some input. Once I change the > junit tests to work with cactus they no longer work > with JunitEE. > > I am generating a war file from JunitEE that I am > later running the cactifywar ant task against. So that > cactus can execute the tests too. > > The tests have the static suite method added, for > example > > import org.apache.cactus.ServletTestSuite; > ... > public static Test suite() { > ServletTestSuite suite = new > ServletTestSuite(); > suite.addTestSuite(FriIdTest.class); > return suite; > } > > so cactus can call the junit tests. When I try and > run these tests via the JunitEE testservlet I get > following exception > > java.lang.NoClassDefFoundError: > org/apache/cactus/ServletTestSuite
This seems to indicate that you're missing the cactus jar in one of your classpaths. [snip] > The war file that has the tests contains the cactus > jar, here is the list of contents > > Archive: mercury-junit.war > Length Date Time Name > ------ ---- ---- ---- > 0 01-25-05 15:07 META-INF/ > 222 01-25-05 15:07 META-INF/MANIFEST.MF > 0 01-25-05 15:07 WEB-INF/ > 0 01-25-05 15:07 WEB-INF/lib/ > 121070 01-20-05 11:26 WEB-INF/lib/junit.jar > 35754 01-20-05 11:26 WEB-INF/lib/junitee.jar > 199368 01-25-05 15:07 WEB-INF/lib/test.jar > 1742 01-25-05 15:07 WEB-INF/testCase.txt > 9214 01-25-05 15:07 index.html > 1117 01-25-05 15:07 jspRedirector.jsp > 1382 01-25-05 15:07 WEB-INF/web.xml > 29329 01-20-05 11:26 > WEB-INF/lib/aspectjrt-1.1.1.jar > 250604 01-20-05 11:26 > WEB-INF/lib/cactus-1.6.1.jar > 31605 01-20-05 11:26 > WEB-INF/lib/commons-logging-1.0.3.jar > 222618 01-20-05 11:26 > WEB-INF/lib/commons-httpclient-2.0.jar > ------ ------- > 904025 15 files This is showing the WAR file but the test runner is maybe executed in a different JVM and if so you'll also need the right jars in this other JVM's classpath. The other option to verify is to make sure that the Cactus jars are NOT in your system classpath. Thanks -Vincent _________________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais ! Yahoo! Mail : http://fr.mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
