You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Nalini Cactus <ca...@yahoo.com> on 2004/07/06 17:39:54 UTC

Cactus + Ant + Log4J (in Tomcat 4.1.30)

Hi,
    I am getting the following errors. One of them is Log4J set up error and the other is NoClassDefFoundError.
    
    I tried all ways and means. I spent more than 8 hours solving these problems, but I couldn't. I followed the servlet sample that came with cactus 1.6 in set up. I am using Tomcat 4.1.30 as container and running ant script.
 
   [cactus] log4j:WARN No appenders could be found for logger (org.apache.cactus.internal.server.ServerTestCaseCaller).
   [cactus] log4j:WARN Please initialize the log4j system properly.
   [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
   [cactus] Testsuite: com.nerf.test.NerfProductListTest
   [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
   [cactus] Testcase: testDoPostProductList(com.nerf.test.NerfProductListTest): Caused an ERROR
   [cactus] null
   [cactus] java.lang.NoClassDefFoundError
   [cactus]  at com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)
   [cactus]  at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
   [cactus]  at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
   [cactus]  at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
   [cactus]  at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:117)
   [cactus]  at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
   [cactus]  at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
   [cactus]  at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:117)
   [cactus]  at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
   [cactus]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   [cactus]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   ........
   .......
I really appreciate any suggestions.
Thanks in advance,
Nalini.

		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Re: Cactus + Ant + Log4J (in Tomcat 4.1.30)

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Nalini,

In article <20...@smtp-ft6.fr.colt.net>,
Tue, 6 Jul 2004 18:17:42 +0200,
"Vincent Massol" <vm...@pivolis.com> wrote: 
vmassol> The error is as mentioned in the stack trace: 
vmassol> 
vmassol> java.lang.NoClassDefFoundError at
vmassol> com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)

In article <20...@web21528.mail.yahoo.com>,
Tue, 6 Jul 2004 10:27:26 -0700 (PDT),
Nalini Cactus <ca...@yahoo.com> wrote: 
nalini> I checked that file and it is there under
nalini> WEB-INF/classes/com/nerf/test in the cactified war.

That is not what Vincent suggested.

The stacktrace mentioned as follows:
     A class com.nerf.test.NerfProductListTest is found.
     However, while executing com.nerf.test.NerfProductListTest.setUp(),
     some class refered at line #37 of NerfProductListTest.java
     cannot be found.

Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp

RE: Cactus + Ant + Log4J (in Tomcat 4.1.30)

Posted by Nalini Cactus <ca...@yahoo.com>.
Hi Vincent,
 
       Thank you for your  help. I checked that file and it is there under WEB-INF/classes/com/nerf/test in the cactified war. I added cactified war as well as the original war file to the classpath. Still I'm seeing the same error. 
 
I appreciate any help. 
 
Thanks,
Nalini.

Vincent Massol <vm...@pivolis.com> wrote:
Hi Nalini,

The error is as mentioned in the stack trace: 

java.lang.NoClassDefFoundError at
com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)

Also, the stack trace shows that the problem happen on the server side,
which means that the class is probably missing from your WAR/EAR file.

Fix this and it should work :-)

-Vincent

> -----Original Message-----
> From: Nalini Cactus [mailto:cactusnalini@yahoo.com]
> Sent: mardi 6 juillet 2004 17:40
> To: cactus-user@jakarta.apache.org
> Subject: Cactus + Ant + Log4J (in Tomcat 4.1.30)
> 
> Hi,
> I am getting the following errors. One of them is Log4J set up error
> and the other is NoClassDefFoundError.
> 
> I tried all ways and means. I spent more than 8 hours solving these
> problems, but I couldn't. I followed the servlet sample that came with
> cactus 1.6 in set up. I am using Tomcat 4.1.30 as container and running
> ant script.
> 
> [cactus] log4j:WARN No appenders could be found for logger
> (org.apache.cactus.internal.server.ServerTestCaseCaller).
> [cactus] log4j:WARN Please initialize the log4j system properly.
> [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
> [cactus] Testsuite: com.nerf.test.NerfProductListTest
> [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
> [cactus] Testcase:
> testDoPostProductList(com.nerf.test.NerfProductListTest): Caused an ERROR
> [cactus] null
> [cactus] java.lang.NoClassDefFoundError
> [cactus] at
> com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)
> [cactus] at
> org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCa
> ctusTestCase.java:153)
> [cactus] at
> org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWeb
> TestCaller.java:119)
> [cactus] at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_
> aroundBody0(AbstractWebTestController.java:93)
> [cactus] at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_
> aroundBody1$advice(AbstractWebTestController.java:117)
> [cactus] at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(
> AbstractWebTestController.java)
> [cactus] at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletT
> estRedirector.java:101)
> [cactus] at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(S
> ervletTestRedirector.java:117)
> [cactus] at
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirecto
> r.java)
> [cactus] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [cactus] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> ........
> .......
> I really appreciate any suggestions.
> Thanks in advance,
> Nalini.
> 
> 
> ---------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!


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


		
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

RE: Cactus + Ant + Log4J (in Tomcat 4.1.30)

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Nalini,

The error is as mentioned in the stack trace: 

java.lang.NoClassDefFoundError at
com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)

Also, the stack trace shows that the problem happen on the server side,
which means that the class is probably missing from your WAR/EAR file.

Fix this and it should work :-)

-Vincent

> -----Original Message-----
> From: Nalini Cactus [mailto:cactusnalini@yahoo.com]
> Sent: mardi 6 juillet 2004 17:40
> To: cactus-user@jakarta.apache.org
> Subject: Cactus + Ant + Log4J (in Tomcat 4.1.30)
> 
> Hi,
>     I am getting the following errors. One of them is Log4J set up error
> and the other is NoClassDefFoundError.
> 
>     I tried all ways and means. I spent more than 8 hours solving these
> problems, but I couldn't. I followed the servlet sample that came with
> cactus 1.6 in set up. I am using Tomcat 4.1.30 as container and running
> ant script.
> 
>    [cactus] log4j:WARN No appenders could be found for logger
> (org.apache.cactus.internal.server.ServerTestCaseCaller).
>    [cactus] log4j:WARN Please initialize the log4j system properly.
>    [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
>    [cactus] Testsuite: com.nerf.test.NerfProductListTest
>    [cactus] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.962 sec
>    [cactus] Testcase:
> testDoPostProductList(com.nerf.test.NerfProductListTest): Caused an ERROR
>    [cactus] null
>    [cactus] java.lang.NoClassDefFoundError
>    [cactus]  at
> com.nerf.test.NerfProductListTest.setUp(NerfProductListTest.java:37)
>    [cactus]  at
> org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCa
> ctusTestCase.java:153)
>    [cactus]  at
> org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWeb
> TestCaller.java:119)
>    [cactus]  at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_
> aroundBody0(AbstractWebTestController.java:93)
>    [cactus]  at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_
> aroundBody1$advice(AbstractWebTestController.java:117)
>    [cactus]  at
> org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(
> AbstractWebTestController.java)
>    [cactus]  at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletT
> estRedirector.java:101)
>    [cactus]  at
> org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(S
> ervletTestRedirector.java:117)
>    [cactus]  at
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirecto
> r.java)
>    [cactus]  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>    [cactus]  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>    ........
>    .......
> I really appreciate any suggestions.
> Thanks in advance,
> Nalini.
> 
> 
> ---------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!