报错如下:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.clas
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/Stat
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
错误原因:
hive和hadoop中的SLF4J重复了
在两个中的位置分别如下:
- /usr/local/hive/lib/
- /usr/local/hadoop/share/hadoop/common/lib/
解决办法:
删除任意一个 log4j-slf4j-impl.jar 即可,
建议保留版本高版本。