+ Detected both log4j-over-slf4j.jar
+ AND slf4j-log4j12.jar on the class path, preempting
+ StackOverflowError.
+
+
+ The purpose of slf4j-log4j12 module is to delegate or redirect
+ calls made to an SLF4J logger to log4j. The purpose of the
+ log4j-over-slf4j module is to redirect calls made to a log4j
+ logger to SLF4J. If both slf4j-log4j12.jar and
+ log4j-over-slf4j.jar are present on the class path, a
+ StackOverflowError will inevitably occur immediately
+ after the first invocation of an SLF4J or a log4j logger.
+
Here is how the exception might look like:
+ +Exception in thread "main" java.lang.StackOverflowError + at java.util.Hashtable.containsKey(Hashtable.java:306) + at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:36) + at org.apache.log4j.LogManager.getLogger(LogManager.java:39) + at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) + at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:249) + at org.apache.log4j.Category.<init>(Category.java:53) + at org.apache.log4j.Logger..<init>(Logger.java:35) + at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:39) + at org.apache.log4j.LogManager.getLogger(LogManager.java:39) + at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) + at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:249) + at org.apache.log4j.Category..<init>(Category.java:53) + at org.apache.log4j.Logger..<init>(Logger.java:35) + at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:39) + at org.apache.log4j.LogManager.getLogger(LogManager.java:39) + subsequent lines omitted...+ +
As of SLF4J version 1.5.11, the code preempts the inevitable
+ stack overflow error by throwing an exception with details about
+ the actual cause of the problem. This is deemed to be better than
+ leaving the user wondering about the reasons of the
+ StackOverflowError.
+
For more background on this topic see Bridging legacy APIs. +
+ + + + +
+ Detected
+ both jcl-over-slf4j.jar AND slf4j-jcl.jar on the class path,
+ preempting StackOverflowError.
+
+
+ The purpose of slf4j-jcl module is to delegate or redirect
+ calls made to an SLF4J logger to jakarta commons logging
+ (JCL). The purpose of the jcl-over-slf4j module is to redirect
+ calls made to a JCL logger to SLF4J. If both
+ slf4j-jcl.jar and jcl-over-slf4j.jar are present
+ on the class path, then a StackOverflowError will
+ inevitably occur immediately after the first invocation of an
+ SLF4J or a JCL logger.
+
Here is how the exception might look like:
+ +Exception in thread "main" java.lang.StackOverflowError + at java.lang.String.hashCode(String.java:1482) + at java.util.HashMap.get(HashMap.java:300) + at org.slf4j.impl.JCLLoggerFactory.getLogger(JCLLoggerFactory.java:67) + at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:249) + at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) + at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:289) + at org.slf4j.impl.JCLLoggerFactory.getLogger(JCLLoggerFactory.java:69) + at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:249) + at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) + subsequent lines omitted...+ + +
As of SLF4J version 1.5.11, the code preempts the inevitable
+ stack overflow error by throwing an exception with details about
+ the actual cause of the problem. This is deemed to be better than
+ leaving the user wondering about the reasons of the
+ StackOverflowError.
+
For more background on this topic see Bridging legacy APIs. +
+ + +
Failed to load class
diff --git a/slf4j-site/src/site/pages/legacy.html b/slf4j-site/src/site/pages/legacy.html
index a5ba3768..fa8d54da 100644
--- a/slf4j-site/src/site/pages/legacy.html
+++ b/slf4j-site/src/site/pages/legacy.html
@@ -101,10 +101,10 @@
Please note that jcl-over-slf4j.jar and
slf4j-jcl.jar cannot be deployed at the same time. The
- former jar file will cause JCL to delegate the choice of the logging
- system to SLF4J and the latter jar file will cause SLF4J to delegate
- the choice of the logging system to JCL, resulting in an infinite
- loop.
+ former jar file will cause JCL to delegate the choice of the
+ logging system to SLF4J and the latter jar file will cause SLF4J
+ to delegate the choice of the logging system to JCL, resulting in
+ an infinite loop.
@@ -184,9 +184,10 @@
The presence of slf4j-logj12.jar, that is the log4j
binding for SLF4J, will force all SLF4J calls to be delegated to
log4j. The presence of log4j-over-slf4j.jar will in turn
- delegate all log4j API calls to their SLF4J equivalents. If both are
- present simultaneously, slf4j calls will be delegated to log4j, and
- log4j calls redirected to SLF4j, resulting in an endless loop.
+ delegate all log4j API calls to their SLF4J equivalents. If both
+ are present simultaneously, slf4j calls will be delegated to
+ log4j, and log4j calls redirected to SLF4j, resulting in an endless loop.
JUL to SLF4J
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index 8b043278..b5a8c710 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -27,7 +27,20 @@
- March xx, 2010 - Release of SLF4J 1.5.11
+ February 25th, 2010 - Release of SLF4J 1.5.11
+
+
+ Users yet unfamiliar with SLF4J sometimes unknowingly place both
+ log4j-over-slf4j.jar and slf4j-log4j12.jar
+ simultanously on the class path causing stack overflow
+ errors. Simultaneously placing both jcl-over-slf4j.jar and
+ slf4j-jcl.jar on the class path, is another occurrence of
+ the same general problem. As of this version, SLF4J preempts the
+ inevitable stack overflow error by throwing an exception with
+ details about the actual cause of the problem. This is deemed to be
+ better than leaving the user wondering about the reasons of the
+ StackOverflowError.
+
Fixed bug
168. In case log4j-over-slf4j is used and a logback appender
StackOverflowError.
+