jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase problem again.
Date Thu, 24 Apr 2003 13:10:01 GMT
Because the Cactus framework needs to be able to call your Test Case
classes and these classes are loaded in the webapp classloader... (and
thus are not visible by the system classloader).

That said, Cactus tries its best by trying to load the class from the
context class loader and thus it will work in a container that behaves
nicely but not in all containers.

-Vincent

> -----Original Message-----
> From: Friso De Jonge [mailto:friso.de.jonge@logicacmg.com]
> Sent: 24 April 2003 14:58
> To: 'Cactus Users List'
> Subject: RE: java.lang.NoClassDefFoundError:
> org/apache/cactus/ServletTestCase problem again.
> 
> vincent,
> 
> why is it that you should only have cactus.jar in your lib directory,
and
> not in your classpath ?
> 
> friso
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: 24 April 2003 08:58
> To: 'Cactus Users List'
> Subject: RE: java.lang.NoClassDefFoundError:
> org/apache/cactus/ServletTestCase problem again.
> 
> 
> What can happen is that you have a cactus jar in your system
classpath.
> Make sure you only have cactus in your WEB-INF/lib directory.
> 
> Thanks
> -Vincent
> 
> -----Original Message-----
> From: karthik Guru [mailto:karthik_guru2000@yahoo.com]
> Sent: 24 April 2003 09:44
> To: Cactus Users List
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/cactus/ServletTestCase problem again.
> 
> oops sorry forgot to mention that:
> yes i have it in the lib folder. We are using weblogic6.1 sp3.
> The application gets deployed just fine. Am able to use the
application.
> We have a taglibrary jar that is getting used by the JSPs for
> rendering.
> That jar is present in the WEB-INF/lib folder. That is getting picked
up
> as well.
> thanks
> karthik
> 
> 
> Christopher Lenz <cmlenz@gmx.de> wrote:
> Hi Karthik,
> 
> isn't junit.har missing in WEB-INF/lib?
> 
> karthik Guru wrote:
> > I understand it is a very common problem reported here. I got cactus
> to
> > work with our product and now while setting it up for the other, i
ran
> 
> > into this issue.
> >
> > this is how my war file is structured:
> >
> > WEB-INF/lib:
> > cactus.jar
> > aspectjrt.jar
> > commons-logging1.0.jar
> > httpclient.jar
> > testinfra.jar
> > tests.jar
> >
> > tests.jar has all the tests.
> > testinfra.jar has the BaseTestCase (from which all the tests
inherit.)
> +
> > some utilities
> > There is no Class-Path attribute defined in testinfra.jar and
> tests.jar
> > manifests. I assume that everything will get picked up from the
> > WEB-INF/lib folder.
> >
> > I get the NoClassDefFoundError when i run my tests.
> > Any idea as to why the cactus.jar is not getting picked up from
> web-inf\lib.
> >
> > java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase
> > at java.lang.ClassLoader.defineClass0(Native Method)
> >
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
> >
> > at
>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
> >
> > at
> >
>
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
> ssLoader.java:394)
> >
> > at
> >
>
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
> der.java:157)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
> >
> > at
> >
>
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAware
> ClassLoader.java:47)
> >
> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
> >
> > at java.lang.ClassLoader.defineClass0(Native Method)
> >
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
> >
> > at
>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
> >
> > at
> >
>
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
> ssLoader.java:394)
> >
> > at weblogic.utils.classloaders.GenericClassLoader.findCla
> 
> --
> Christopher Lenz
> /=/ cmlenz at gmx.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> 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