PDA

View Full Version : Tomcat 5.5, Log4J, Spring


KnisterPeter
Oct 3rd, 2005, 08:31 PM
Hi there,

I recently upgraded to Tomcat 5.5 (before I was running 4.1.x). Now my logging is broken.
During startup Tomcat writes to the default server logs that the files I've setup in log4j.xml could not be found.
I'm using Springs Log4jConfigListener with the env-variable ${webapp.root} for logfiles relative to my application.
I think now Tomcat 5.5 searches a Log4J config file and find my log4j.xml at a point where ${webapp.root} is not set. Therefore initialization fails.
This isn't corrected by the Log4jConfigListener afterwards (I think because Log4J is already configured)...

Am I completly wrong or is there any solutions for this problem?
Thanks in advance.

ifun
Jul 9th, 2006, 03:07 AM
I also have this problem.

Tomcat5.5 + spring + log4j.xml(not log4j.properties)

Tomcat stops due to prev error, Error listenerStart.

I check spring sample, none of log4j.xml could be found but log4j.properties.

Could somebody solve it?

Thanks.

ifun

Costin Leau
Jul 9th, 2006, 02:17 PM
Could you post some stacktrace or info messages. Tomcat 5.5 doesn't work by default with log4j - see this webpage for more info: http://tomcat.apache.org/tomcat-5.5-doc/logging.html