jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: java.lang.NoClassDefFoundError: org/apache/cactus/ServletTestCase
Date Sat, 23 Feb 2002 11:41:11 GMT
Oh .... That's interesting. How strange ... ! If I understand you're
saying that the classloader hierarchy (parent on the left) is the
following for Jetty :

WEB-INF/classes CL --> WEB-INF/lib CL --> system CL

I have not seen any other container doing this (but then my knowledge is
limited !). That's indeed an issue ...

So, even if you put your ServletTestCase subclasses in WEB-INF/lib CL,
it is still a problem because these subclasses need to call your classes
under test, which are located under the WEB-INF/classes CL, no ?

The only solution I can see (if the above is true) is to expand the
cactus.jar into WEB-INF/classes ...

What do you think ? I think we may need to ask on the jetty mailing-list
how they would solve this issue ...


> -----Original Message-----
> From: Fred Loney [mailto:loney@spiritedsw.com]
> Sent: 23 February 2002 06:46
> To: Cactus Users List
> Cc: Cactus Dev List
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/cactus/ServletTestCase
> > The solution was to ensure that all ServletTestCase subclasses are
> > the war classes or a war lib rather than a common ear lib.
> As a follow-up, the ServletTestCase subclasses must reside in a war
> .jar, not in the war classes. For Jetty (and other web containers?),
> classes are loaded by their own classloader that is a parent of the
> lib context classloader, resulting in the same problem as before.
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message