[slf4j-dev] [Bug 22] jcl104-over-slf4j throws exception on release()

bugzilla-daemon at gil.qos.ch bugzilla-daemon at gil.qos.ch
Thu Jun 1 11:50:33 CEST 2006


http://bugzilla.slf4j.org/show_bug.cgi?id=22





------- Additional Comments From bjorn at implior.se  2006-06-01 11:50 -------
Ceki,

My setup is a default Tomcat installation, except that xercesImpl.jar
is placed in common/lib (this shouldn't affect anything). The only
logging jars I can identify are these:

bin/commons-logging-api.jar
bin/tomcat-juli.jar
webapps/hang/WEB-INF/lib/jcl104-over-slf4j.jar
webapps/hang/WEB-INF/lib/slf4j-simple.jar

I did not configure JCL, so its discovery finds java.util.logging.

Now I have done some more testing by turning on diagnostics in JCL.
I also hardwired JCL to use SimpleLog in order to eliminate any
possibility that the problem was related to tomcat-juli.
The diagnostics indicate that Tomcat's JCL-LogFactory finds the
SLF4J implementation and uses it for its WebappClassLoader.
Later when the webapp is undeployed, WebappClassLoader calls
the static JCL method LogFactory.release(this) which finds the
SLF4J instance and calls its release() method.

The above is just my guess. I am not familiar with the internal
workings of either Tomcat or JCL.

Anyway, here is the relevant part of the JCL diagnostics:


[INFO] HostConfig - Deploying web application archive hang.war
newInstance(org.apache.catalina.startup.ExpandWar) using public
org.apache.commons.logging.impl.SimpleLog(java.lang.String)
null[LOOKUP] LogFactory implementation requested for the first time for context
classloader org.apache.catalina.loader.WebappClassLoader at 19255406
null[LOOKUP] org.apache.catalina.loader.WebappClassLoader at 19255406 ==
'WebappClassLoader

  delegate: false

  repositories:

----------> Parent Classloader:

org.apache.catalina.loader.StandardClassLoader at 1d0d45b

'
null[LOOKUP] ClassLoader
tree:org.apache.catalina.loader.WebappClassLoader at 19255406 -->
org.apache.catalina.loader.StandardClassLoader at 30463067 -->
org.apache.catalina.loader.StandardClassLoader at 24105143 -->
sun.misc.Launcher$AppClassLoader at 19175605 (SYSTEM)  -->
sun.misc.Launcher$ExtClassLoader at 27634497 --> BOOT
null[LOOKUP] No properties file of name 'commons-logging.properties' found.
null[LOOKUP] Looking for system property [org.apache.commons.logging.LogFactory]
to define the LogFactory subclass to use...
null[LOOKUP] No system property [org.apache.commons.logging.LogFactory] defined.
null[LOOKUP] Looking for a resource file of name
[META-INF/services/org.apache.commons.logging.LogFactory] to define the
LogFactory subclass to use...
null[LOOKUP]  Creating an instance of LogFactory class
org.apache.commons.logging.impl.SLF4FLogFactory as specified by file
'META-INF/services/org.apache.commons.logging.LogFactory' which was present in
the path of the context classloader.
nullLoaded class org.apache.commons.logging.impl.SLF4FLogFactory from
classloader org.apache.catalina.loader.WebappClassLoader at 19255406
nullCreated object org.apache.commons.logging.impl.SLF4FLogFactory at 18724539 to
manage classloader org.apache.catalina.loader.WebappClassLoader at 19255406


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the slf4j-dev mailing list