我已经为我的 spring boot 应用程序配置了 logback.xml。我的 spring boot 版本 - 1.3.3.RELEASE,java 版本 - 1.8 update 45,tomcat 版本 - 8。
我已将 logback.xml 文件放在本地 tomcats/lib 文件夹中。
每当我在没有调试配置的情况下运行我的 tomcat 时,它都能正常工作。
但每当我尝试在 catalina.bat 文件中配置调试运行服务器时(使用此选项 - 设置“JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket......”)它显示 java.lang.ClassCircularityError: java/util/logging/LogRecord 和 tomcat 窗口关闭。
详细错误跟踪:
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)
我已经尝试了线程中给出的所有解决方案 - ClassCircularityError when running Tomcat 6 from Eclipse
但没有任何效果。
有没有人最近遇到过这个问题?此问题是否有任何解决方案或解决方法?
谢谢。
最佳答案
解决方案 有两种解决方法:
- 在您的项目中,移动
<contextListener ...>
在你的logback.xml
行配置文件到文件末尾。 代替
step 1
上面,对于那些正在运行Tomcat
的人,存在另一种解决方法来自Eclipse
.不。相反,运行Tomcat
来自terminal
:./catalina.sh start
关于java.lang.ClassCircularityError : java/util/logging/LogRecord from Tomcat8 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37344264/