在运行我的java代码时,我得到了以下运行时异常。有没有人能帮我解决绑定冲突。
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-android-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-jcl-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-jdk14-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Air/Desktop/sms/slf4j-1.7.7/slf4j-simple-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.AndroidLoggerFactory]
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Fatal error in constructor!
... 2 more发布于 2014-04-06 23:50:00
您似乎有几个SLF4J实现;您应该排除所有不必要的实现
发布于 2014-10-10 00:21:55
这个错误意味着您的类路径中有多个SLF4J实现。查看这些错误具体说明了什么。即:SLf4J: Found binding in..... (这将打印它找到StaticLoggerBinder.class实例的所有jar文件)。从类路径中删除所有此类jar,但需要其StaticLoggerBinder.class实现的jar除外。
发布于 2016-04-13 14:35:08
您可以转到POM.xml,打开依赖关系层次结构,然后通过右键单击"exclude maven entries.Except“找到slf4j maven one exclude one
https://stackoverflow.com/questions/22896243
复制相似问题