tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo Jiménez <>
Subject RE: Log4j and Tomcat problem
Date Wed, 23 Aug 2006 19:51:54 GMT
Also in order to work with log4j, you have to include this in the WEB-INF/classes directory.

I include them as a sample.


-----Original Message-----
From: Lou Caudell [] 
Sent: Wednesday, August 23, 2006 1:08 PM
To: Tomcat Users List
Subject: Re: Log4j and Tomcat problem

pompiuses wrote:
> I'm using Tomcat 5.0.30 running on Ubuntu Linux (6.06).
> I've made a small webapp which runs fine under Tomcat on Windows, but on
> Linux I've got a problem with log4j.
> I've put "commons-logging-1.1.jar" and "log4j-1.2.13.jar" in the webapp libs
> directory ($CATALINA_HOME/webapps/ROOT/WEB-INF/lib). In the webapp classes
> directory I've put
> The problem is that the webapp won't even run as long as
> "commons-logging-1.1.jar" is in the class path. If I remove it, the webapp
> will run but there's no logging.
> Then I tried putting in $CATALINA_HOME/shared/classes and
> $CATALINA_HOME/common/classes, but it still wouldn't log anything.
> No error messages is written to system.out (/var/log/tomcat5/catalina.out)
> or any of the Tomcat log files.
> My look like this (just prints to the console):
> # The log4j configuration file.
> log4j.rootLogger=debug, R
> log4j.appender.R=org.apache.log4j.ConsoleAppender
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%-5p %-30.30c{1} %x - %m%n
> How can I test if really is in the classpath? Perhaps it's
> missing from the classpath?
> Perhaps using the ROOT directory for my webapp is a bad idea?
> Any comments and suggestions are welcome :-)
Couple of things,
1) Try putting the log4j*.jar in tomcat*\commons\lib and see if it works..
2) You may be missing the jtds*.jar.

- Lou Caudell

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

Si usted no es el destinatario indicado en este mensaje o responsable como persona de la entrega
del mensaje, no debe copiar o reenviar este mensaje, por favor notifique al correo
 Para más referencia sobre términos importantes relacionados a este correo visite

If you are not the addressee indicated in this message (or responsible for delivery of the
message to such person), you may not copy or send this message to anyone, please notify to  Click on the following link for important additional terms relating
to this e-mail

View raw message