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: Servlet Exception...
Date Sun, 04 Aug 2002 18:15:50 GMT
Hi Kumar,

> -----Original Message-----
> From: Kumar_maniranjan [mailto:Kumar_maniranjan@infosys.com]
> Sent: 04 August 2002 13:10
> To: cactus-user@jakarta.apache.org
> Subject: Servlet Exception...
> 
> hi,
> 
> I m getting this error while trying to test my application on
> weblogic(Please see stack-trace). Is it necessary to include test
classes
> in the application's WAR and have cactus.jar in the WEF-INF/lib
directory?
> Cant we do without it? As it will simply mix-up test classes with the
> actual project.

You must have test classes and classes under test in the same WAR. Now
for cactus.jar and the other jars, they need to be either in the
WEB-INF/lib directory (it will always work) or somewhere available by
your container context class loader (if this feature is supported by
your container). I haven't tried that with WL myself.

What happens in your case is that you must have put cactus.jar not in
your WEB-INF/lib directory (like in the system classloader) and thus
when it tries to load your test class, it cannot find it (as the test
classes are in WEB-INF/lib which is not visible from the system
classloader).

Cheers,
-Vincent

> 
> Hoping for a fast reply,
> regards,
> Maniranjan Kumar
> 
> 
> 
> 
> 
> 
> 
> Test Server Log File
> -----------------------------
> javax.servlet.ServletException: Error finding class
> [test.com.***.************.ejb.positions.Test*******SessionBean] using
> both the Context classloader and the webapp classloader. Possible
causes
> include:
> 	- Your webapp does not include your test classes,
> 	- 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
> 	at
>
org.apache.cactus.server.AbstractTestCaller.getTestClassClass(AbstractTe
st
> Caller.java:349)
> 	at
>
org.apache.cactus.server.AbstractTestCaller.getTestClassInstance(Abstrac
tT
> estCaller.java:298)
> 	at
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
va
> :142)
> 	at
>
org.apache.cactus.server.AbstractTestController.dispatch79_handleRequest
(A
>
bstractTestController.java;org/apache/cactus/util/log/LogAspect.java(1k)
:1
> 23)
> 	at
>
org.apache.cactus.server.AbstractTestController.around79_handleRequest(A
bs
>
tractTestController.java;org/apache/cactus/util/log/LogAspect.java(1k):1
14
> 0)
> 	at
>
org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTe
st
> Controller.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.dispatch88_doPost(Servlet
Te
> stRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):132)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.around88_doPost(ServletTe
st
> Redirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1140)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.java;org/apache/cactus/util/log/LogAspect.java(1k):118)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.dispatch87_doGet(ServletT
es
> tRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):105)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.around87_doGet(ServletTes
tR
> edirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1140)
> 	at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirect
or
> .java;org/apache/cactus/util/log/LogAspect.java(1k):101)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
ja
> va:265)
> 	at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:21)
> 	at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27
> )
> 	at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
et
> Context.java:2464)
> 	at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
ja
> va:2039)
> 	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> 	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> 
> --
> 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>


Mime
View raw message