Details
-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.0.5.GA, JBossAS-4.2.0.GA
-
None
Description
The Log4jProxy class in the JCL fork has this:
ClassLoader loader = Thread.currentThread().getContextClassLoader();
// Validate that TCL can actually see the log4j classes
try
{
Class levelClass = loader.loadClass("org.apache.log4j.Level");
...
}
catch(ClassNotFoundException e)
{
// No, hack to fall back to this class' class loader
loader = Log4jProxy.class.getClassLoader();
}
This throws an NPE if the TCCL is null.
On a recent case a finalize() method ended up trying to instantiate a logger; failed because the Finalizer thread didn't have a TCCL set.