I'm using Cactus 1.4.1, Tomcat 4.1.24, and JDK 1.4.2.
I have an existing web application that has a set of Cactus tests that
work fine.
I now have a new application where I'm using a slightly different
directory structure, but is otherwise pretty similar.
I tried to copy all the setup pieces from the first application to the
second. The Cactus setup is causing me problems in the second
application.
In both cases, I build a "test.war" that gets installed into the Tomcat
"webapps" dir. Each war has a "WEB-INF/lib" directory which contains
(among others) the "cactus-1.4.1.jar" file.
I'm starting with a single "stubbed" test case class in the second
application, just to make sure I get through all the setup tasks. Once
the stubbed test case executes properly, all the hard work is done.
For some reason, the second application is failing with an exception
like the following. As I said, the "cactus-1.4.1.jar" file is in the
"WEB-INF/lib" of the war file, just like in the application where this
is working. The "org.apache.cactus.ServletTestCase" class is in that
jar. I don't understand what I could possibly do to screw this up.
I'll respond with some of the relevant configuration files if someone
doesn't have a quick answer.
java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
tTestRunner.java:237)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
tTestRunner.java:210)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitT
estRunner.java:520)
Exception in thread "main"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]