一、异常日志
SLF4J: Detected both jcl-over-slf4j.jar AND slf4j-jcl.jar on the class path, preempting StackOverflowError.@b@SLF4J: See also http://www.slf4j.org/codes.html#jclDelegationLoop for more details.@b@java.lang.ExceptionInInitializerError@b@at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:82)@b@at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:51)@b@at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)@b@at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)@b@at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)@b@at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)@b@at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
二、解决步骤
1.异常日志说明class path下检查到既引入了jcl-over-slf4j.jar又引入slf4j-jcl.jar,导致栈溢出;
2.第二行也给出了查看jcl委托循坏的官网地址
3.经查jcl-over-slf4j.jar表示将jcl日志委托给slf4j,slf4j-jcl将slf4j日志委托给jcl,所以造成了死循环;
4.再这里我们只要删除其中任何一个即可,因项目中采用slf4j统一管理日志,所以这里删除了slf4j-jcl.jar。