question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

See original GitHub issue

HELP ME!!! I have Spring boot project. i run on server Centos.I build and run success.But after run about 15 minute request server.Server die .Here my Log:

Exception in thread "http-nio-7070-exec-6" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
        at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
        at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
        at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
        at ch.qos.logback.classic.Logger.log(Logger.java:765)
        at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:221)
        at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:303)
        at java.util.logging.Logger.log(Logger.java:738)
        at java.util.logging.Logger.doLog(Logger.java:765)
        at java.util.logging.Logger.logp(Logger.java:1041)
        at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:182)
        at org.apache.juli.logging.DirectJDKLog.error(DirectJDKLog.java:148)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1531)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
aalkucommented, Mar 1, 2018

I also think this is an issue of spring boot itself. I’m getting this error with a repackaged runnable jar with ZIP layout and that class is in classpath at compile time because I have spring-boot-starter-logging dependency. The class is in .m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar and it is on the repackaged jar at \BOOT-INF\lib\ but the class loader cannot find it. I’m using spring-boot 1.5.10.RELEASE

I get:

Exception in thread "xxxThread" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
        at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
        at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
        at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
        at ch.qos.logback.classic.Logger.log(Logger.java:765)
        at org.apache.commons.logging.impl.SLF4JLocationAwareLog.error(SLF4JLocationAwareLog.java:216)
        at xxxx(xxxx.java:119)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more

LoggingEvent and ThrowableProxy are inside the same jar so if one is loaded and can’t see the other class loaded I think it means the former was loaded before some error with the class loader that can’t now load the second one when it’s needed.

Maybe I need to run this on startup so the class gets loaded:

log.debug("this is really not an error, it's just to initialize the logging subsystem before the classLoader fails", new RuntimeException());

Please help with this issue.

5reactions
wilkinsonacommented, Jun 13, 2016

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

You might also like to try Googling the error. It throws up this thread on the Logback user list, for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ch.qos.logback.classic.spi.ThrowableProxy? - Stack Overflow
This error happens when spring applications jar are rebuilt, removed, or updated during execution.
Read more >
java.lang.NoClassDefFoundError: ch/qos ... - Google Groups
Probably found a workaround - to create instances of ch.qos.logback.classic.spi.LoggingEvent and ThrowableProxy before vertx is created. Need to ...
Read more >
ch/qos/logback/classic/spi/ThrowableProxy - 简书
When a library declares a compile-time dependency on a SLF4J provider, it imposes that provider on the end-user, thus negating SLF4J's purpose.
Read more >
ch/qos/logback/classic/spi/ThrowableProxy - 阿里云开发者社区
An SLF4J binding designates an artifact such as slf4j-jdk14.jar or slf4j-log4j12.jar used to bind slf4j to an underlying logging framework, say, java.util.
Read more >
Error ClassNotFoundException: ch.qos.logback.core.Context ...
The result is the code working if I put the logback jars under WEB-INF/lib and the following error (java.lang.ClassNotFoundException: ch.qos.logback.core.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found