[slf4j-user] ClassCircularityError when using LevelChangePropagator

Ceki Gülcü ceki at qos.ch
Tue Feb 22 11:39:42 CET 2011


Hello Martin,

Could you provide more context? For example, are you packaging logback 
jar in your web-app or are they placed in tomcat's lib directory? A 
small web-app reproducing the problem would be great.

Oh, I have no idea what ClassCircularityError means. First time I hear 
of it.
--
Ceki

On 22/02/2011 11:02 AM, Martin Trummer wrote:
> hi,
>
> I get a "java.lang.ClassCircularityError: java/util/logging/LogRecord"
> error when I try to start my web-app in tomcat 7.
>
> first I call:
> SLF4JBridgeHandler.install();
> and then wehn I try to log to a java.util.Logger, I get the exception
> (stack trace below)
>
> this happens only when I use the LevelChangePropagator (in my logback.xml file)
>         <contextListener
> class="ch.qos.logback.classic.jul.LevelChangePropagator">
>         </contextListener>
>
> If I son't install the LevelChangePropagator I get no exception and
> the JUL logging is routet to the slf4j logging.
> I am using Tomcat 7.
>
> does anyone have an idea, what the problem could be?
> I didn't find much usefull info about the java.lang.ClassCircularityError.
>
> cheers, Martin
>
>
> *******************
> stacktrace:
>
> SCHWERWIEGEND: Exception sending context initialized event to listener
> instance of class com.dewesoft.dsmon.server.DsMonContextLoaderListener
> java.lang.ClassCircularityError: java/util/logging/LogRecord
>         at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:168)
>         at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:257)
>         at java.util.logging.Logger.log(Logger.java:481)
>         at java.util.logging.Logger.doLog(Logger.java:503)
>         at java.util.logging.Logger.log(Logger.java:526)
>         at java.util.logging.Logger.info(Logger.java:1045)
>         at com.dewesoft.dsmon.server.logging.DsMonLogging.init(DsMonLogging.java:23)
>         at com.dewesoft.dsmon.server.DsMonContextLoaderListener.contextInitialized(DsMonContextLoaderListener.java:13)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4600)
>         at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097)
>         at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> 002 14:14:59.463 [Thread-5] DEBUG o.a.c.loader.WebappClassLoader -
> loadClass(ch.qos.logback.classic.spi.ThrowableProxy, false)
> 18.02.2011 14:14:59 org.apache.catalina.core.ContainerBase backgroundProcess
> WARNUNG: Exception processing loader WebappLoader[/dsm] background process
> java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.ClassCircularityError: java/util/logging/LogRecord
>         at org.apache.tomcat.util.threads.DedicatedThreadExecutor.execute(DedicatedThreadExecutor.java:62)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5091)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>         at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3736)
>         at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:424)
>         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1207)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1382)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.util.concurrent.ExecutionException:
> java.lang.ClassCircularityError: java/util/logging/LogRecord
>         at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>         at org.apache.tomcat.util.threads.DedicatedThreadExecutor.execute(DedicatedThreadExecutor.java:56)
>         ... 10 more
> Caused by: java.lang.ClassCircularityError: java/util/logging/LogRecord
>         at org.slf4j.bridge.SLF4JBridgeHandler.getSLF4JLogger(SLF4JBridgeHandler.java:168)
>         at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:257)
>         at java.util.logging.Logger.log(Logger.java:481)
>         at java.util.logging.Logger.doLog(Logger.java:503)
>         at java.util.logging.Logger.logp(Logger.java:619)
>         at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:183)
>         at org.apache.juli.logging.DirectJDKLog.debug(DirectJDKLog.java:106)
>         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
>         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
>         at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123)
>         at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:471)
>         at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:427)
>         at ch.qos.logback.classic.Logger.log(Logger.java:846)
>         at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:192)
>         at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:267)
>         at java.util.logging.Logger.log(Logger.java:481)
>         at java.util.logging.Logger.doLog(Logger.java:503)
>         at java.util.logging.Logger.logp(Logger.java:703)
>         at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
>         at org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:151)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4605)
>         at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097)
>         at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         ... 1 more
> 18.02.2011 14:14:59
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor
> processChildren
> SCHWERWIEGEND: Exception invoking periodic operation:
> java.lang.ClassCircularityError: ch/qos/logback/classic/spi/ThrowableProxy
>         at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123)
>         at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:471)
>         at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:427)
>         at ch.qos.logback.classic.Logger.log(Logger.java:846)
>         at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:192)
>         at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:267)
>         at java.util.logging.Logger.log(Logger.java:481)
>         at java.util.logging.Logger.doLog(Logger.java:503)
>         at java.util.logging.Logger.logp(Logger.java:703)
>         at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
>         at org.apache.juli.logging.DirectJDKLog.warn(DirectJDKLog.java:141)
>         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1209)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1382)
>         at java.lang.Thread.run(Thread.java:662)
> Exception in thread
> "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
> java.lang.ClassCircularityError:
> ch/qos/logback/classic/spi/ThrowableProxy
>         at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123)
>         at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:471)
>         at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:427)
>         at ch.qos.logback.classic.Logger.log(Logger.java:846)
>         at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:192)
>         at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:267)
>         at java.util.logging.Logger.log(Logger.java:481)
>         at java.util.logging.Logger.doLog(Logger.java:503)
>         at java.util.logging.Logger.logp(Logger.java:703)
>         at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:185)
>         at org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:151)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1396)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
>         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1382)
>         at java.lang.Thread.run(Thread.java:662)
> 002 14:15:58.322 ["http-bio-8080"-exec-2] DEBUG
> o.a.t.u.threads.ThreadPoolExecutor - Stopping thread
> "http-bio-8080"-exec-2 to avoid potential memory leaks after a context
> was stopped.
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://qos.ch/mailman/listinfo/slf4j-user



More information about the slf4j-user mailing list