RE: ClassNotFoundException for test classes
"Magnus Grimsell" <[email protected]>
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <AC0E4F93E4EA0741B0987148298E9F040E7783@narnia.idainfront.idainfront.se> |
Your test class should extend a Cactus test case class like for example ServletTestCase. Hope that helps. - Magnus -----Ursprungligt meddelande----- Från: Magnus Grimsell [mailto:[email protected]] Skickat: fr 2006-09-01 16:48 Till: Cactus Users List; [email protected] Ämne: SV: SV: SV: ClassNotFoundException for test classes Strange. Looks good to me. If you can send me the complete war and source code I can have a look at it later. Right now I'm off to weekend beer :) - Magnus -----Ursprungligt meddelande----- Från: Pierre Moermans [mailto:[email protected]] Skickat: den 1 september 2006 16:41 Till: Cactus Users List Ämne: Re: SV: SV: ClassNotFoundException for test classes As I tried the easiest project, There is only one class (without package) TopicAuthentication, and its corresponding test class TestTopicAuthentication ************ Output of the test run **************** TestTopicAuthentication java.lang.ClassNotFoundException: TestTopicAuthentication at java.net.URLClassLoader$1.run(URLClassLoader.java:199) 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) *********** Listing of the cactified WAR *********** META-INF/ META-INF/MANIFEST.MF WEB-INF/ WEB-INF/classes/ WEB-INF/classes/TestTopicAuthentication.class WEB-INF/lib/ WEB-INF/tld/ WEB-INF/classes/TopicAuthentication.class WEB-INF/weblogic.xml WEB-INF/web.xml WEB-INF/lib/aspectjrt-1.2.1.jar WEB-INF/lib/cactus-1.7.jar WEB-INF/lib/commons-logging-1.0.3.jar WEB-INF/lib/commons-httpclient-2.0.2.jar WEB-INF/lib/junit.jar jspRedirector.jsp **************************************************** many thanks, Pierre M. ----- Original Message ----- Subject: SV: SV: ClassNotFoundException for test classes Date: Fri, September 1, 2006 16:25 From: "Magnus Grimsell" <[email protected]> > Could you supply the logs from your test run and a listing of the cactified war? > > - Magnus > > -----Ursprungligt meddelande----- > Från: Pierre Moermans [mailto:[email protected]] > Skickat: den 1 september 2006 16:19 > Till: Cactus Users List > Ämne: Re: SV: ClassNotFoundException for test classes > > > Thanks Magnus ! > > Alas ... neither junit, nor cactus is in my Weblogic classpath. > If I remove the two corresponding jars from the cactified war, I get a > (logical) > java.lang.ClassNotFoundException: > org.apache.cactus.server.ServletTestRedirector. > > Thanks anyway ! > > Pierre M. > > ----- Original Message ----- > Subject: SV: ClassNotFoundException for test classes > Date: Fri, September 1, 2006 14:31 > From: "Magnus Grimsell" <[email protected]> > > > Make sure that cactus or junit jars isn't available at system or > ear-classloader. > > > > - Magnus > > > > -----Ursprungligt meddelande----- > > Från: Pierre Moermans [mailto:[email protected]] > > Skickat: den 1 september 2006 14:28 > > Till: [email protected] > > Ämne: ClassNotFoundException for test classes > > > > > > Hello, > > > > I try to run cactus tests on Weblogic 8.1 and I get a > > ClassNotFoundException telling the test class cannot be found. > > > > I've seen many threads about this and it always appears that the test > > classes where missing either in the WEB-INF/classes of the cactified war, > > or in the classpath on the client side. > > > > I ckecked that (by echoing the classpath in my ant build-script and > > viewing the content of the war file on the server) and the classes are > > present on both sides ! > > > > > > Any hint would be greatly appreciated. > > > > Many thanks, > > > > > > Pierre M. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]