《Springboot极简教程》问题解决:Idea解决Gradle库依赖冲突问题:Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting
2017-09-13 14:26
781 查看
错误日志
Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details. at org.slf4j.impl.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:54) ... 11 more :bootRun FAILED
Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path
classpath jar包冲突
gradle -q app:dependencies
依赖树分析
参考:
https://docs.gradle.org/current/userguide/userguide_single.html#sec:listing_dependencies
45down voteaccepted
So you have to exclude conflict dependencies. Try this:
<exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId></exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> </exclusions>
This solved same problem with slf4j .
Gradle
compile('org.raml:raml-parser:0.8.12'){ exclude module: 'slf4j-log4j12' exclude module: 'log4j' }
相关文章推荐
- 13.4 库依赖冲突问题:Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path
- Java学习-051-Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError
- IDEA maven项目查自动查看依赖关系,解决包冲突问题
- Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflow
- spring boot log4j2与三方依赖库log4j冲突无法初始化问题解决方法
- Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError
- maven解决重复依赖版本冲突问题
- Intellij Idea使用-解决导入maven project包依赖问题
- IDEA和VI编辑器冲突问题解决
- 程序集引用版本冲突问题的解决办法:合并依赖项
- Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar
- idea 中解决maven 包冲突的问题(maven helper)
- 解决项目添加bmob sdk 3.5.0在编译时出现依赖类库的冲突问题
- 使用idea同步、更新、解决冲突等相关问题
- 解决maven依赖传递中的版本冲突问题
- 解决Maven中依赖冲突问题
- 解决编译时依赖版本冲突问题
- 解决Maven中依赖冲突问题
- 阿里云ACE上碰到的坑log4j-over-slf4j.jar和slf4j-log4j12.jar冲突问题,我去……
- maven项目由于多个依赖中含有同一个jar包导致的冲突问题的解决办法