您的位置:首页 > 大数据 > 人工智能

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

2013-04-27 22:09 381 查看
Phenomenon: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

In official FAQ: This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar,
slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

My situation: I have log4j jar file on my classpath. Then, what reason cause this?

Analysis: The problem is in the POM.xml:

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
<scope>test</scope>
</dependency>
Solution: remove the line <scope>test</scope>. Everything goes well.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐