java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticL

来源:互联网 发布:设计软件 logo cdr 编辑:程序博客网 时间:2024/06/04 18:52

运行hadoop    jar  包时出现以下错误提示;

Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
    at myrandomforest.TestForest.<clinit>(TestForest.java:62)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:153)

这是版本问题:

链接:http://www.slf4j.org/download.html

这里下载最新的jar文件并将slf4j-api-1.6.3.jar和slf4j-log4j12-1.6.3.jar这两个替换到hadoop安装目录下的lib文件夹下的旧版本之后搞定。


0 0