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 ...

Thanks
-Vincent

> -----Original Message-----
> From: Fred Loney [mailto:[EMAIL PROTECTED]]
> 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
in
> > 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
lib
> .jar, not in the war classes. For Jetty (and other web containers?),
war
> classes are loaded by their own classloader that is a parent of the
web
> lib context classloader, resulting in the same problem as before.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>
> 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to