1、报错情境
运行 /etc/rc.d/init.d/hadoop-hbase-thrift start时报错
2、错误描述
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/lib/hbase/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/lib/hadoop-0.20/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
3、解决方案
去掉一个slf4j-log4j12-1.4.3.jar,可运行如下命令:
# cd /usr/lib/hadoop-0.20/lib/
# mv slf4j-log4j12-1.4.3.jar slf4j-log4j12-1.4.3.jar.bak
4、参考
http://www.slf4j.org/codes.html#multiple_bindings