1. 程式人生 > >SLF4J-jar包多繫結衝突解決

SLF4J-jar包多繫結衝突解決

每次執行 hbase shell 時,出現如下提示:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/itcast/hbase-0.98.18-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/itcast/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

從提示資訊來看,是hadoop的slf4j 與hbase的slf4j jar包發生了衝突,移除其中一個即可

執行:

rm -f /itcast/hbase-0.98.18-hadoop2/lib/slf4j-log4j12-1.6.4.jar

移除jar包即可