tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Deitcher <>
Subject log4j in webapp hanging Tomcat?
Date Sun, 02 Jul 2006 02:26:30 GMT
Has anyone seen this or know how to work around it?

I have a webapp deployed on Tomcat 5.5.16 (FWIW, the bundled version
that came with Netbeans 5.5). In order to do its own logging, the webapp
has log4j-1.2.8.jar deployed in WEB-INF/lib/. and in
WEB-INF/classes/. The properties is very simple, as follows below:

# log4j configuration file

# Set root category priority to ERROR and set its only appender to A1
log4j.rootCategory=ERROR, A1

# here is the A1 appender
log4j.appender.A1.layout.ConversionPattern=%d [%t] %p %c %x.%M - %m%n.

# finally, any that are set

The simple classes (a JSF backing bean and a filter) are set to use
either commons-logging or log4j directly (I tried both). In either case,
the moment that I uncomment any category line and one of my classes (the
filter or the bean) calls log.debug("some message"), Tomcat freezes
entirely. This is true whether I use log4j directly or commons-logging
in my classes, and whether or not I comment or uncomment the first
log4j.rootCategory line in I get some output from the
appender matching the pattern, and then freeze. I cannot access any
context; I cannot use the manager; the only thing I can do is kill the
Tomcat process.

I am at wit's end with this; it took literally days to narrow down that
it was log4j's activation doing it.


Avi Deitcher

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

View raw message