SLF4J warning or error messages and their meanings
The method
o.a.commons.logging.impl.SLF4FLogFactory#release
was invoked.
Given the structure of the commons-logging API, in particular
as implemented by SLF4J, the
o.a.commons.logging.impl.SLF4FLogFactory#release()
method should never be called. However, depending on the
deployment of commons-logging.jar files in your servlet
container, release()
method may be unexpectedly
invoked by a copy of
org.apache.commons.logging.LogFactory
class shipping
with commons-logging.jar.
This is a relatively common occurrence with recent versions of Tomcat, especially if you place jcl-over-slf4j.jar in WEB-INF/lib directory of your web-application instead of $TOMCAT_HOME/common/lib, where $TOMCAT_HOME stands for the directory where Tomcat is installed. In order to fully benefit from the stability offered by jcl-over-slf4j.jar, we recommend that you place jcl-over-slf4j.jar in $TOMCAT_HOME/common/lib without placing a copy in your web-applications.
Please also see bug #22.
Operation [suchAndSuch] is not supported in jcl-over-slf4j.
An UnsuportedOperationException
is thrown whenever
one of the protected methods introduced in JCL 1.1 are
invoked. These methods are invoked by LogFactory
implementations shipping with
commons-logging.jar. However, the LogFactory
implemented by jcl-over-slf4j.jar, namely
SLF4FLogFactory, does not call any of these methods.
If you observe this problem, then it is higly probable that you have a copy of commons-logging.jar in your class path overriding the classes shipping with jcl-over-slf4j.jar. Note that this issue is very similar in nature to the warning issued when the "o.a.commons.logging.impl.SLF4FLogFactory.release()" method is invoked, discussed in the previous item.
Failed to load class
org.slf4j.impl.StaticLoggerBinder
This error is reported when the
org.slf4j.impl.StaticLoggerBinder
class could not be
loaded into memory. This happens when no appropriate SLF4J
binding could be found on the class path. Placing one (and only
one) of slf4j-nop.jar, slf4j-simple.jar,
slf4j-log4j12.jar, slf4j-jdk14.jar or
logback-classic.jar on the class path should solve the
problem.
Logging factory implementation cannot be null
This error is reported when the LoggerFactory
class could not find an appropriate binding. Placing one (and only
one) of slf4j-nop.jar, slf4j-simple.jar,
slf4j-log4j12.jar, slf4j-jdk14.jar or
logback-classic.jar on the class path should prove to be
an effective remedy.
Failed to load class "org.slf4j.impl.StaticMDCBinder"
This error indicates that appropriate SLF4J binding could not be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.
MDCAdapter cannot be null
This error is reported when org.slf4j.MDC
class
has not been initialized correctly. Same cause and remedy as the
previously listed item.
SLF4J versions 1.4.0 and later requires log4j 1.2.12 or later
The trace level was added to log4j in version 1.2.12 released on August 29, 2005. The trace level was added to the SLF4J API in version 1.4.0 on May 16th, 2007. Thus, starting with SLF4J 1.4.0, the log4j binding for SLF4J requires log4j version 1.2.12 or above.
However, as reported in bug 68, in
some environments it may be difficult to upgrade the log4j
version. To accomodate such circumstances, SLF4J's
Log4jLoggerAdapter
will map the TRACE level as
DEBUG.