`
san_yun
  • 浏览: 2663217 次
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder

 
阅读更多

工程启动报错

 

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
    at org.slf4j.LoggerFactory.staticInitialize(LoggerFactory.java:83)
    at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:73)
    at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)
    at com.duitang.test.SolrTester.main(SolrTester.java:11)
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 4 more

 

其实就是缺少两个包,一个是slf4j-log4j12-1.5.6.jar、一个是log4j-1.2.14.jar

<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>slf4j-log4j12</artifactId>
	<version>1.6.6</version>
</dependency>
<dependency>
	<groupId>log4j</groupId>
	<artifactId>log4j</artifactId>
	<version>1.2.17</version>
</dependency>
 

 

 

参考:http://gongstring.iteye.com/blog/481555

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics