[slf4j-user] jcl104-over-slf4j throws exception on release()
Bjorn Danielsson
bjorn at implior.se
Tue May 23 12:22:14 CEST 2006
Tomcat refuses to undeploy a webapp that uses jcl104-over-slf4j.
This breaks hot-deployment, and sometimes seems to cause trouble when
shutting down Tomcat.
I traced the cause to an exception thrown by:
org.apache.commons.logging.impl.SLF4FLogFactory.release()
This method unconditionally throws a runtime exception whenever it
is called. The webapp has jcl104-over-slf4j.jar in its WEB-INF/lib,
and when Tomcat undeploys the webapp, it somehow causes the release
method to be called. Unfortunately it's hard to see exactly from
where, since Tomcat rethrows e.toString() instead of the original
exception itself...
When I change SLF4FLogFactory.release() into a no-op instead,
the problem goes away.
Am I doing something wrong here, or is this a SLF4J bug?
Are there situations where throwing this exception is useful?
The problem occurs both with log4j and slf4j-simple bindings,
and with the following software versions:
SLF4J version 1.0.1
Tomcat 5.0.28 and JDK1.4
Tomcat 5.5.15 and JDK1.5
BTW, I tried to look in the SLF4J Bugzilla first, but it seems to be
broken (looks like the famous Perl/DBI "wrong socket path" problem).
--
Björn Danielsson <bjorn at implior.se>
Implior AB <URL:http://www.implior.se>
More information about the slf4j-user
mailing list