jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mukund B Patel" <mukundbpa...@rediffmail.com>
Subject query on cactus
Date Fri, 16 May 2003 05:48:36 GMT
Hi,

I am a new user for cactus. I got error when I run the test class. 
Here I mention the scenario of my code.

1) I use the JRun3.0 web server
2) All the required jar files are in classpath
3) I have updated cactus.properties file like,
    cactus.contextURL = http://localhost:8100/testcase
    cactus.servletRedirectorName = ServletRedirector
4) I put the cactus.properties file in the directory from which 
my
    test class run
5) I have updated the web.xml like,
    <servlet>
 	  <servlet-name>ServletRedirector</servlet-name>
 	  
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
 	</servlet>
 	<servlet-mapping>
 	    <servlet-name>ServletRedirector</servlet-name>
 	    <url-pattern>/ServletRedirector</url-pattern>
 	</servlet-mapping>
6) I have put the cactus.jar in my WEB-INF/lib directory

7) I have written one simple test class like,

    public void testSample()
    {
        System.out.println("this is my first test case!!!");
    }

When I run the test class I got the following error.
------------------------------------------------------------------------
log4j:WARN No appenders could be found for logger 
(org.apache.cactus.util.JUnitVersionHelper).
log4j:WARN Please initialize the log4j system properly.
.E
Time: 0.711
There was 1 error:
1) testGetMethod(DataSenderexTest)javax.servlet.ServletException: 
Error finding class [DataSenderexTest] 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.AbstractWebTestCaller.getTestClassClass(AbstractWebTestCaller.java:344)
 	at 
org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(AbstractWebTestCaller.java:301)
 	at 
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:143)
 	at 
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):125)
 	at 
org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)
 	at 
org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):101)
 	at 
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):123)
 	at 
org.apache.cactus.server.ServletTestRedirector.around113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)
 	at 
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):109)
 	at 
org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)
 	at 
org.apache.cactus.server.ServletTestRedirector.around112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)
 	at 
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):92)
 	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
 	at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
 	at 
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
 	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
 	at 
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
 	at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
 	at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
 	at allaire.jrun.WorkerThread.run(WorkerThread.java:74)

FAILURES!!!
Tests run: 1,  Failures: 0,  Errors: 1
----------------------------------------------------------------------

What I miss somthing? Can u give me solution for this error? Your 
help is very valuable for me.

Thank you.

- Mukund Patel




IntraAction Software Solution
Software Engineer
Ahmedabad
intraaction@hotmail.com
___________________________________________________
Get email that means BUSINESS! me @ mycompany.com.
Just Rs.1499/year.
To start, click http://www.rediffmailpro.com


Mime
View raw message