You are problably redeploying jars that are out of the scope of the ear. The JVM cache's the orginal and then when the jar is deployed there are two copies. I would suggest that all of the jars/ejbs that are required for the test are in the ear. My application.xml looks like this ( the cactus and junit could prop. go in the lib dir but I do not like poluting those directories )
<?xml version="1.0" encoding="ISO-8859-1"?> <application> <display-name>Rns Test</display-name> <module> <web> <web-uri>rnsTest.war</web-uri> <context-root>/import/rns/tests</context-root> </web> </module> <module> <java>cactus.jar</java> </module> <module> <java>junit.jar</java> </module> <module> <java>candata_test_util.jar</java> </module> <module> <java>rns-mbeans.jar</java> </module> <module> <java>cadex-mbeans.jar</java> </module> <module> <ejb>rns.jar</ejb> </module> <module> <java>rns-test.jar</java> </module> <module> <java>gateway.jar</java> </module> <module> <java>candata_ext_util.jar</java> </module> <module> <java>edi.jar</java> </module> </application> On Mon, 2002-12-02 at 13:57, SainTiss wrote: > Hi, > > I found out the second exception was my own fault (packaging mistake), > but the first is still a mistery... (although I'm not able to reproduce > it so it seems...) > > Hans > > On Mon, 2002-12-02 at 18:22, SainTiss wrote: > > Hi, > > > > I managed to build and run a simple cactus test, but then I rebuilt and > > redeployed it, and then I was getting a ClassCastException, followed by > > the message that several of my classes were "unknown sources"... > > > > I restarted jboss, and now I'm not getting the above exception anymore, > > but this one: > > > > [junit] Testcase: testName took 1.457 sec > > [junit] Caused an ERROR > > [junit] Error finding class [tests.TestPersonEJB] using both the > > Context classloader and the webapp classloader. Possible causes include: > > [junit] - Your webapp does not include your test classes, > > [junit] - The cactus.jar is not located in your WEB-INF/lib > > directory and your Container has not set the Context classloader to > > point to the webapp one > > [junit] javax.servlet.ServletException: Error finding class > > [tests.TestPersonEJB] using both the Context classloader and the webapp > > classloader. Possible causes include: > > [junit] - Your webapp does not include your test classes, > > [junit] - The cactus.jar is not located in your WEB-INF/lib > > directory and your Container has not set the Context classloader to > > point to the webapp one > > [junit] at > > >org.apache.cactus.server.AbstractWebTestCaller.getTestClassClass(AbstractWebTestCaller.java:344) > > [junit] at > > >org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(AbstractWebTestCaller.java:301) > > [junit] at > > >org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:143) > > [junit] at > > >org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):125) > > > > And it goes on like this... > > > > Does anyone have any idea what could be the problem? (especially since > > it worked before, and all I did was rebuild and redeploy the EJB and the > > tests) > > > > Thanks, > > > > Hans > > > > > > > > > ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user