Tuesday, September 05, 2006

Log NullPointerException when starting Tomcat

if you find the following stacktrace when starting Tomcat with commons-logging-1.1.jar and log4j:

at org.apache.log4j.Category.isEnabledFor(Category.java:757)
at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogge

It seems to be related to a bug in commons-logging related to the implementation of support for trace-level logging. Replace it with and older version (such as 1.0.4). At least for me it worked pretty well. It seems that commons-logging passes a wrong parameter to log4j.

I commented it in Tomcat bug 39090 (actually the same stacktrace is refered in 39631, but it was set as duplicated).
Post a Comment