java - SLF4J 绑定(bind)问题

标签 java logging slf4j

1. SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.    
2. SLF4J: Your binding is version 1.5.5 or earlier.    
3. SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x    
4. Aug 8, 2012 3:56:54 PM org.apache.catalina.core.StandardContext listenerStart    
SEVERE: Exception sending context initialized event to listener instance of class   org.springframework.web.util.Log4jConfigListener    
5. java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;    
6. at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)    
7. at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)    
8. at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)    
9. at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)    
10. at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)    
11. at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)    
12. at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)    
at org.springframework.util.PropertyPlaceholderHelper.<clinit>  (PropertyPlaceholderHelper.java:40)    
13. at org.springframework.util.SystemPropertyUtils.<clinit>(SystemPropertyUtils.java:49)    

    Dependency are     
13. [WARNING] The POM for org:jfreechart:jar:1.0.14 is missing, no dependency inform ation available    
13.   [WARNING] The POM for org:JFreeCharts:jar:1.0 is missing, no dependency information available    
13.   [WARNING] The POM for org.cpr:cpr:jar:1.0 is missing, no dependency information available    
13.   [WARNING] The artifact axis:axis-jaxrpc:jar:1.4 has been relocated to org.apache.axis:axis-jaxrpc:jar:1.4    
13.   [INFO]    
13.   [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ JiraWeb ---    
13.   [WARNING] Missing POM for org.jiraAPI:soap:jar:4.4.5    
13.   [WARNING] Missing POM for org.jiraAPI:soapDEV:jar:4.4.5    
13.   [WARNING] Missing POM for org:jfreechart:jar:1.0.14    
13.   [WARNING] Missing POM for org:JFreeCharts:jar:1.0    
13.   [WARNING] While downloading axis:axis-jaxrpc:1.4    
13.   This artifact has been relocated to org.apache.axis:axis-jaxrpc:1.4.    
13.   [WARNING] Missing POM for org.cpr:cpr:jar:1.0    
13.   [INFO] com.jpmc.gti.jira:JiraWeb:war:1.0.1-SNAPSHOT    
13.   [INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile    
13.   [INFO] +- org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile    
13.   [INFO] +- org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile    
13.   [INFO] +- org.springframework:spring-web:jar:3.0.5.RELEASE:compile    
13.   [INFO] |  \- aopalliance:aopalliance:jar:1.0:compile    
13.   [INFO] +- org.springframework:spring-webmvc:jar:3.0.5.RELEASE:compile    
13.   [INFO] +- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile    
13.   [INFO] +- javax.servlet:servlet-api:jar:2.5:provided    
13.   [INFO] +- org.directwebremoting:dwr:jar:3.0rc1:compile    
13.   [INFO] |  \- org.mortbay.jetty:cometd:jar:6.1.4:compile    
13.   [INFO] |     \- org.mortbay.jetty:jetty-util:jar:6.1.4:compile    
13.   [INFO] +- org.jiraAPI:soap:jar:4.4.5:compile    
13.   [INFO] +- org.jiraAPI:soapDEV:jar:4.4.5:compile    
13.   [INFO] +- commons-logging:commons-logging:jar:1.1.1:compile    
13.   [INFO] +- commons-lang:commons-lang:jar:2.4:compile    
13.   [INFO] +- commons-pool:commons-pool:jar:1.4:compile    
13.   [INFO] +- commons-collections:commons-collections:jar:3.2:compile    
13.   [INFO] +- commons-dbcp:commons-dbcp:jar:1.2.2:compile    
13.   [INFO] +- commons-discovery:commons-discovery:jar:0.4:compile    
13.   [INFO] +- commons-net:commons-net:jar:1.4.1:compile    
13.   [INFO] |  \- oro:oro:jar:2.0.8:compile    
13.   [INFO] +- commons-io:commons-io:jar:1.4:compile    
13.   [INFO] +- commons-fileupload:commons-fileupload:jar:1.2:compile    
13.   [INFO] +- log4j:log4j:jar:1.2.14:compile    
13.   [INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile    
13.   [INFO] |  \- org.slf4j:slf4j-api:jar:1.6.1:compile    
13.   [INFO] +- junit:junit:jar:4.8.2:compile    
13.   [INFO] +- oracle:oracle:jar:11.1.0.6:compile    
13.   [INFO] +- javax.servlet:jstl:jar:1.1.2:runtime    
13.   [INFO] +- taglibs:standard:jar:1.1.2:compile    
13.   [INFO] +- org.apache.tiles:tiles-jsp:jar:2.2.2:compile    
13.   [INFO] |  +- org.apache.tiles:tiles-servlet:jar:2.2.2:compile    
13.   [INFO] |  \- org.apache.tiles:tiles-template:jar:2.2.2:compile    
13.   [INFO] +- org.apache.tiles:tiles-core:jar:2.2.2:compile    
13.   [INFO] |  +- commons-digester:commons-digester:jar:2.0:compile    
13.   [INFO] |  \- org.slf4j:jcl-over-slf4j:jar:1.5.8:compile    
13.   [INFO] +- org.apache.tiles:tiles-api:jar:2.2.2:compile    
13.   [INFO] +- org.apache.poi:poi:jar:3.7:compile    
13.   [INFO] +- org.apache.poi:poi-ooxml:jar:3.7:compile    
13.   [INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:3.7:compile    
13.   [INFO] |  |  +- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile    
13.   [INFO] |  |  |  \- stax:stax-api:jar:1.0.1:compile    
13.   [INFO] |  |  \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0:compile    
13.   [INFO] |  \- dom4j:dom4j:jar:1.6.1:compile    
13.   [INFO] |     \- xml-apis:xml-apis:jar:1.0.b2:compile    
13.   [INFO] +- org.springframework:spring-test:jar:3.0.5.RELEASE:test    
13.   [INFO] +- org.easymock:easymock:jar:2.5.2:test    
13.   [INFO] +- org.easymock:easymockclassextension:jar:2.5.2:test    
13.   [INFO] |  +- cglib:cglib-nodep:jar:2.2:test    
13.   [INFO] |  \- org.objenesis:objenesis:jar:1.2:test    
13.   [INFO] +- net.sf.ezmorph:ezmorph:jar:0.8.1:compile    
13.   [INFO] +- jfree:jcommon:jar:1.0.9:compile    
13.   [INFO] +- org:jfreechart:jar:1.0.14:compile    
13.   [INFO] +- org:JFreeCharts:jar:1.0:compile    
13.   [INFO] +- axis:axis:jar:1.4:compile    
13.   [INFO] |  +- org.apache.axis:axis-saaj:jar:1.4:compile    
13.   [INFO] |  \- axis:axis-wsdl4j:jar:1.5.1:runtime    
13.   [INFO] +- org.apache.axis:axis-jaxrpc:jar:1.4:compile    
13.   [INFO] +- org.cpr:cpr:jar:1.0:compile    
13.   [INFO] +- com.sun.jersey:jersey-core:jar:1.12:compile    
13.   [INFO] +- com.sun.jersey:jersey-client:jar:1.12:compile    
13.   [INFO] +- net.sf.json-lib:json-lib:jar:jdk15:2.3:compile    
13.   [INFO] |  \- commons-beanutils:commons-beanutils:jar:1.8.0:compile    
13.   [INFO] +- org.quartz-scheduler:quartz:jar:2.1.5:compile    
13.   [INFO] |  \- c3p0:c3p0:jar:0.9.1.1:compile    
13.   [INFO] \- javax.mail:mail:jar:1.4:compile    
13.   [INFO]    \- javax.activation:activation:jar:1.1:compile    
14. Anyone has faced this issue.. any pointer will be really helpful. Thanks.    

最佳答案

"org.slf4j:jcl-over-slf4j:jar:1.5.8:compile"

那个需要升级到 1.6.6。

它提供了分配给 SLF4J 的 Commons Logging 的实现。 (因此,您可能还应该排除其他 commons-logging jar)。

关于java - SLF4J 绑定(bind)问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11863955/

相关文章:

java - 有没有正确的方法在 slf4j 中传递参数?

java - 启动嵌入式 Jetty 不起作用,SLF4J 响应错误

java - 无法对单元格表列进行排序

java - 将scala引入现有的netbeans java项目

python - Jython 日志记录时间错误

objective-c - CocoaLumberjack 未登录 iOS 中的后台线程

java - 尝试初始化 Spring 时出现 AbstractMethodError

java - slf4j 可以同时处理多个日志框架吗?

java - java 远处的 Sprite 变暗

python - StreamHandler - 不记录到 docker 容器中的 sys.stdout - Python