Hi,
I am using logback (latest version) on Tomcat, and have this error when trying to start the application:
Exception in thread "RMI RenewClean-<ip>:<port>" java.lang.ClassCircularityError: java/util/logging/LogRecord
at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:200)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:289)
at java.util.logging.Logger.log(Logger.java:458)
at java.util.logging.Logger.doLog(Logger.java:480)
at java.util.logging.Logger.logp(Logger.java:596)
The error is blocking Tomcat startup.
The application has logback and jul-over-slf4j bridge JARs inside, and is using a servlet context listener to run SLF4JBridgeHandler.removeHandlersForRootLogger() and SLF4JBridgeHandler.install() on startup. The logback.xml used has ch.qos.logback.classic.jul.LevelChangePropagator context listener in it, with resetJUL set to true.
I saw a thread on this mailing list in
February 2011 with the similar issue so it might be quite old. Tomcat version is 7, but the mail list thread and this
StackOverflow question are using Tomcat 6 and having the same problem.
As the last answer on StackOverflow correctly says, error is reproducible only if the LevelChangePropagator element is in the beginning of logback.xml. Moving it to the end of the file fixes the issue, so it has an easy workaround.
If you have problems reproducing it please let me know, I'll try to provide a test project.
--
Best regards,
Sergey Parhomenko