Steve Grant wrote:
>
> I'm always getting this when running the sample ant scripts - is there
> some kind of class path modification I need to do. Sorry if this is
> posted twice.
>
> [junit] Running
> org.apache.commons.cactus.sample.unit.TestServletTestCase_TestResult
> [java] 2001-07-31 12:15:06 - path="/test" :ServletRedirector:
> init
> [java] java.lang.ClassNotFoundException:
> org.apache.commons.cactus.sample.unit.TestServletTestCase_TestResult
> [java] at java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
> [java] at java.lang.Exception.<init>(Exception.java, Compiled
> Code)
> [java] at
> java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java,
> Compiled Code)
> [java] at java.net.URLClassLoader$1.run(URLClassLoader.java,
> Compiled Code)
> [java] at java.security.AccessController.doPrivileged(Native
> Method)
> [java] at java.net.URLClassLoader.findClass(URLClassLoader.java,
> Compiled Code)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java,
> Compiled Code)
your test classes need to be available to both client side and server
side.
that means that if you have some tests compiled and running in
container, say under a WEB-INF/classes directory, then you need to make
sure those are available to whatever client side program you are running
the tests from - say ant running the optional task, or even directly
from the junit.swingui.TestRunner class. (or vice versa)
>From the above trace it looks like your server can't find the test
classes - check they are in the _server_ classpath.
Jari
--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd