jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeev....@accenture.com
Subject Cactus: java.lang.ClassNotFoundException: org.apache.cactus.server.ServletTestRedirector
Date Sat, 10 May 2003 11:49:43 GMT

Hi Chris  ,
      thanks for the response . I finally migrated to a newer version of
cactus now viz. 1.4 . Here too some bottle necks :-) .  I am running the
cactus test for the SampleServlet in a WSAD 5.0 env.  After placing all the
required jars in project class path  and setting up the config file when I
ran the TestSampleServlet component I started getting the error
'java.lang.ClassCastException:
org.apache.commons.logging.impl.LogFactoryImpl'  which I was able to solve
by changing the exclude.properties in the the junit-3.7.jar and  placing it
in the WSAD  plugin folder as including it in the application class path
was having no effect. This was because WSAD 5.0 is powered by eclipse which
comes with a junit plugin and the server was always refering this . After I
resolved tgis when I again tried running the TestSampleServlet I am getting
a new error in the Swing Junit UI console

"java.lang.ClassNotFoundException:
org.apache.cactus.server.ServletTestRedirector
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:382&
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:248)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:79)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:79)
at java.beans.Beans.instantiate(Beans.java:216)
at java.beans.Beans.instantiate(Beans.java:77)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:147)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:286)
at
com.ibm.servlet.engine.webapp.WebApp.getServletReference(WebApp.java:384)
-- - - - - - - - - - - -
 - - - - - - - - - - - - -  "

Apart from this I also see a logger related error on the WSAD console .....
log4j:ERROR No appenders could be found for category
(org.apache.cactus.util.JUnitVersionHelper).
log4j:ERROR Please initialize the log4j system properly.
log4j:ERROR No appenders could be found for category
(org.apache.commons.httpclient.HttpClient).
log4j:ERROR Please initialize the log4j system properly.

Can somebody throw some light on the above problems .

thanks in advance ,

----------------------------------------------------------------
Rajeev Pai
Accenture
Mumbai Delivery Centre -2
Direct Dial - 091 022 55984492
AIM ID - lotusPi
------------------------------------------------------------------


                                                                                         
                                             
              Christopher Lenz                                                           
                                             
              <cmlenz@gmx.de>                  To:      Cactus Users List <cactus-user@jakarta.apache.org>
                            
                                               cc:                                       
                                             
              05/09/2003 02:56 PM              Subject: Re: Cactus: Getting Error org.apache.cactus.util.ChainedRuntimeException:
Not  
              Please respond to                a valid response , Pls help               
                                             
              "Cactus Users List"                                                        
                                             
                                                                                         
                                             
                                                                                         
                                             



Hi Rajeev,

first, why aren't you using the latest Cactus release (1.4.1)? It should
be more stable and powerful, obviously.

The "Not a valid response" exception can mean about anything. More
recent versions of Cactus include the actual response in the exception
message so it is visible what has happened. Most often, the exception is
due to a "404 Not Found" from the web server, which would mean that the
URL used to request the test redirector (cactus.contextURL) doesn't
match the URL the redirector is mapped to. It would probably help you if
you could either trace the HTTP transaction using some application, or
get a detailled log. I'm not sure how that worked in 1.3 though :-P

-chris

rajeev.pai@accenture.com wrote:
> Hi ,
>    I am have downloaded the Cactus verion 1.3 and integrated it with  IBM
> WSAD version 5.0 . I following exactly the same procedure as mentioned in
> the  How-tos for configuration and setting up the class path in the WSAD
> env. M aim is to see how a servlet can be tested hence , I copied the
> SampleServlet and the TestSampleServlet components  and placed it in the
> servlet directory of my web application . After this I started the server
,
> went the java perspective and ran the  TestSampleServlet component as a
> java application up on which the swing UI poped up . Up till this things
> seem to be fine but when the testXXX methods are being called , all  of
> them fail , with the error message  " Not a valid response " , the error
> trace in the UI runs as follows :
>
>       org.apache.cactus.util.ChainedRuntimeException: Not a valid
response
>       at
>
org.apache.cactus.client.WebTestResultParser.readRootElement(LogAspect.java(1k):134)

>       at
>
org.apache.cactus.client.WebTestResultParser.dispatch29_parse(LogAspect.java(1k):101)

>       at
>
org.apache.cactus.client.WebTestResultParser.around29_parse(LogAspect.java(1k):1221)

>       at
> org.apache.cactus.client.WebTestResultParser.parse(LogAspect.java(1k):96)
>       at
>
org.apache.cactus.client.AbstractHttpClient.callGetResult(LogAspect.java(1k):231)

>       at
>
org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(LogAspect.java(1k):123)

>       at
>
org.apache.cactus.client.AbstractHttpClient.around1_doTest(LogAspect.java(1k):1221)

>       at
>
org.apache.cactus.client.AbstractHttpClient.doTest(LogAspect.java(1k):115)
>       at
>
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:457)

>       at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
>       at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
>
> I wonder what else is missing as I have the web.xml , cactus.properties
> with correct entries and all the required jars in the classpath . Can
some
> body please guide me .
>
>
>
> ----------------------------------------------------------------
> Rajeev Pai
> Accenture
> Mumbai Delivery Centre -2
> Direct Dial - 091 022 55984492
> AIM ID - lotusPi
> ------------------------------------------------------------------



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






This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.


Mime
View raw message