-
Patch
-
Resolution: Done
-
Major
-
JBossAS-4.0.3 SP1, JBossAS-4.0.4.CR2
-
None
A deployment that tries to used a overriden log4j configuration using a scoped deployment using the commons-logging LogFactory with a commons-logging.properties like:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
fails to initialize log4j correctly because the commons-logging.jar is scoped to the jboss server/lib class loader and the log4j classes are also bound to this class loaders log4j.jar. A patch to modify the Log4JLogger to lazily bind to the log4j classes using the LogFactory caller class loader via reflection has been added to the 1.0.5.GA-jboss release of commons-logging.
The previous org.apache.commons.logging.impl.Log4JLogger behavior can be found in the org.apache.commons.logging.impl.DefaultLog4JLogger class.