jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magnus Grimsell" <magnus.grims...@idainfront.se>
Subject RE: classpath, Classpath, CLASSPATH!?!?!
Date Sun, 06 Nov 2005 14:54:43 GMT
Where do you have your test case classes? If they are loaded from the EAR classloader the junit
classes will be as well.
If both your test case and junit classes are put under cactus.war/WEB-INF/lib and no where
else it should work as far as I can see.

Magnus Grimsell

> -----Original Message-----
> From: Carpentier, Nelson [mailto:NCarpentier@icat.com]
> Sent: Wednesday, October 26, 2005 9:10 PM
> To: Cactus Users List
> Subject: RE: classpath, Classpath, CLASSPATH!?!?!
> 
> 
> Okay...  Found my problem:  The junit.jar file needed to be in the
> APP-INF/lib/ directory at the EAR level.
> 
> - Nelz
> 
> -----Original Message-----
> From: Carpentier, Nelson 
> Sent: Tuesday, October 25, 2005 4:09 PM
> To: cactus-user@jakarta.apache.org
> Subject: classpath, Classpath, CLASSPATH!?!?!
> 
> 
> Ok...  I need help yet again...
> 
> I have deployed pmc_test.ear, which looks like this:
> 
> 	pmc_test.ear
> 		|
> 		junit-3.8.1.jar
> 		|
> 		cactus.war
> 			|
> 			WEB-INF/lib
> 				|
> 				junit-3.8.1.jar
> 
> 
> ... And somehow I'm getting a "NoClassDefFoundError:
> junit/framework/TestCase".
> 
> I've also tried removing the junit.jar from the ear, leaving 
> it only in
> the war, yet I still get the same error.
> 
> Does anyone have any idea what's going on for me?
> 
> Thanks!
> - Nelz 
> 
> java.lang.NoClassDefFoundError: junit/framework/TestCase
> 	at
> java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.
> security.P
> rotectionDomain;)Ljava.lang.Class;(Unknown Source)
> 	at
> java.security.SecureClassLoader.defineClass(Ljava.lang.String;
> [BIILjava.
> security.CodeSource;)Ljava.lang.Class;(SecureClassLoader.java:123)
> 	at
> weblogic.utils.classloaders.GenericClassLoader.findLocalClass(
> Ljava.lang
> .String;)Ljava.lang.Class;(GenericClassLoader.java:476)
> 	at
> weblogic.utils.classloaders.GenericClassLoader.findClass(Ljava
> .lang.Stri
> ng;)Ljava.lang.Class;(GenericClassLoader.java:181)
> 	at
> java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang
> .Class;(Un
> known Source)
> 	at
> java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang
> .Class;(Un
> known Source)
> 	at
> java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.
> Class;(Unk
> nown Source)
> 	at
> weblogic.utils.classloaders.GenericClassLoader.loadClass(Ljava
> .lang.Stri
> ng;)Ljava.lang.Class;(GenericClassLoader.java:223)
> 	at
> weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(L
> java.lang.
> String;)Ljava.lang.Class;(ChangeAwareClassLoader.java:41)
> 	at
> java.lang.ClassLoader.loadClassFromNative(II)Ljava.lang.Class;(Unknown
> Source)
> 	at jrockit.vm.Classes.forName0(Ljava.lang.String;ZI)I(Unknown
> Source)
> 	at
> jrockit.vm.Classes.forName(Ljava.lang.String;ZLjava.lang.Class
> Loader;)Lj
> ava.lang.Class;(Unknown Source)
> 	at
> java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoa
> der;)Ljava
> .lang.Class;(Unknown Source)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFrom
> ContextCla
> ssLoader_aroundBody2(Ljava.lang.String;Lorg.aspectj.lang.JoinP
> oint;)Ljav
> a.lang.Class;(ClassLoaderUtils.java:78)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFrom
> ContextCla
> ssLoader_aroundBody3$advice(Ljava.lang.String;Lorg.aspectj.lan
> g.JoinPoin
> t;Lorg.apache.cactus.util.log.LogAspect;Lorg.aspectj.runtime.i
> nternal.Ar
> oundClosure;Lorg.aspectj.lang.JoinPoint;)Ljava.lang.Object;(Cl
> assLoaderU
> tils.java:246)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClassFrom
> ContextCla
> ssLoader(Ljava.lang.String;)Ljava.lang.Class;(ClassLoaderUtils.java:0)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aro
> undBody0(L
> java.lang.String;Ljava.lang.Class;Lorg.aspectj.lang.JoinPoint;
> )Ljava.lan
> g.Class;(ClassLoaderUtils.java:61)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass_aro
> undBody1$a
> dvice(Ljava.lang.String;Ljava.lang.Class;Lorg.aspectj.lang.Joi
> nPoint;Lor
> g.apache.cactus.util.log.LogAspect;Lorg.aspectj.runtime.intern
> al.AroundC
> losure;Lorg.aspectj.lang.JoinPoint;)Ljava.lang.Object;(ClassLo
> aderUtils.
> java:246)
> 	at
> org.apache.cactus.internal.util.ClassLoaderUtils.loadClass(Lja
> va.lang.St
> ring;Ljava.lang.Class;)Ljava.lang.Class;(ClassLoaderUtils.java:0)
> 	at
> org.apache.cactus.internal.server.AbstractWebTestCaller.getTes
> tClassClas
> s(Ljava.lang.String;)Ljava.lang.Class;(AbstractWebTestCaller.java:485)
> 	at
> org.apache.cactus.internal.server.AbstractWebTestCaller.doTest
> ()V(Abstra
> ctWebTestCaller.java:109)
> 	at
> org.apache.cactus.internal.server.AbstractWebTestController.ha
> ndleReques
> t_aroundBody0(Lorg.apache.cactus.internal.server.AbstractWebTe
> stControll
> er;Lorg.apache.cactus.spi.server.ImplicitObjects;Lorg.aspectj.
> lang.JoinP
> oint;)V(AbstractWebTestController.java:93)
> 	at
> org.apache.cactus.internal.server.AbstractWebTestController.ha
> ndleReques
> t_aroundBody1$advice(Lorg.apache.cactus.internal.server.Abstra
> ctWebTestC
> ontroller;Lorg.apache.cactus.spi.server.ImplicitObjects;Lorg.a
> spectj.lan
> g.JoinPoint;Lorg.apache.cactus.util.log.LogAspect;Lorg.aspectj
> .runtime.i
> nternal.AroundClosure;Lorg.aspectj.lang.JoinPoint;)Ljava.lang.
> Object;(Ab
> stractWebTestController.java:217)
> 	at
> org.apache.cactus.internal.server.AbstractWebTestController.ha
> ndleReques
> t(Lorg.apache.cactus.spi.server.ImplicitObjects;)V(AbstractWeb
> TestContro
> ller.java:0)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo
> dy2(Lorg.a
> pache.cactus.server.ServletTestRedirector;Ljavax.servlet.http.
> HttpServle
> tRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.aspectj.
> lang.JoinP
> oint;)V(ServletTestRedirector.java:101)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBo
> dy3$advice
> (Lorg.apache.cactus.server.ServletTestRedirector;Ljavax.servle
> t.http.Htt
> pServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.a
> spectj.lan
> g.JoinPoint;Lorg.apache.cactus.util.log.LogAspect;Lorg.aspectj
> .runtime.i
> nternal.AroundClosure;Lorg.aspectj.lang.JoinPoint;)Ljava.lang.
> Object;(Se
> rvletTestRedirector.java:217)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doPost(Ljavax.s
> ervlet.htt
> p.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)
> V(ServletT
> estRedirector.java:0)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod
> y0(Lorg.ap
> ache.cactus.server.ServletTestRedirector;Ljavax.servlet.http.H
> ttpServlet
> Request;Ljavax.servlet.http.HttpServletResponse;Lorg.aspectj.l
> ang.JoinPo
> int;)V(ServletTestRedirector.java:72)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doGet_aroundBod
> y1$advice(
> Lorg.apache.cactus.server.ServletTestRedirector;Ljavax.servlet
> .http.Http
> ServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.as
> pectj.lang
> .JoinPoint;Lorg.apache.cactus.util.log.LogAspect;Lorg.aspectj.
> runtime.in
> ternal.AroundClosure;Lorg.aspectj.lang.JoinPoint;)Ljava.lang.O
> bject;(Ser
> vletTestRedirector.java:217)
> 	at
> org.apache.cactus.server.ServletTestRedirector.doGet(Ljavax.se
> rvlet.http
> .HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V
> (ServletTe
> stRedirector.java:0)
> 	at
> javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.Htt
> pServletRe
> quest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:740)
>  
> 
> Confidentiality Note: This message contains information that may be
> confidential and/or privileged. If you are not the intended recipient,
> you should not use, copy, disclose, distribute or take any 
> action based
> on this message. If you have received this message in error, please
> advise the sender immediately by reply email and delete this message.
> Although ICAT Managers, LLC scans e-mail and attachments for 
> viruses, it
> does not guarantee that either are virus-free and accepts no liability
> for any damage sustained as a result of viruses.  Thank you.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
>  
> 
> Confidentiality Note: This message contains information that 
> may be confidential and/or privileged. If you are not the 
> intended recipient, you should not use, copy, disclose, 
> distribute or take any action based on this message. If you 
> have received this message in error, please advise the sender 
> immediately by reply email and delete this message. Although 
> ICAT Managers, LLC scans e-mail and attachments for viruses, 
> it does not guarantee that either are virus-free and accepts 
> no liability for any damage sustained as a result of viruses. 
>  Thank you.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 

Mime
View raw message