Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Log4j problems in Tomcat 5.x

Filip Hanik

2004-04-29


what class is not found? why dont you give us the error message :)
----- Original Message -----
From: "Michael Greer" <michaelggreer@(protected)>
To: "Tomcat Users List" <tomcat-user@(protected)>
Sent: Thursday, April 29, 2004 2:31 PM
Subject: Log4j problems in Tomcat 5.x


hello,
I switched from Tomcat 4 to 5, and ever since have had unsolvable
problems with logging. In short, the commons logger refuses to use
Log4j. This would be fine for Tomcat itself, but all of my classes that
use commons-logging get taken over in this way. i have moved my own
code to use Log4j directly (so I know it works, and is configured
correctly, and is in the classpath of the context), but all of my jars
that use commons are out of my control.
If I try and force commons to use log4j, ( with
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogg
er in a commons-logging.properties file in /WEB-INF/classes), it gives
me a ClassNotFound exception, no matter where I place the log4j jar.
I have seen many messages on this list related to this issue, but no
solutions. Has anyone come up with anything?

thank you,
Michael Greer

PS: I have tried putting the log4j.jar in server/lib. shared/lib,
common/lib. This problem occurs in Linux and Mac OS X. My
log4j.properties file is in my /WEB-INF/classes folder, and is being
read correctly for my own classes which use log4j directly.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.