首页 文章

运行配置单元0.12,错误为slf4j

提问于
浏览
2

使用jar中的配置初始化日志:文件:/usr/local/hive/lib/hive-common-0.12.0.jar!/hive-log4j.properties

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-    1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

蜂巢>

5 回答

  • 1

    由于冲突sl4j.jar正在从HIVE和HADOOP路径中使用,因此您收到此类警告消息 . 为了摆脱这个问题,只需从/ usr / local / hive / lib中删除hive-jdbc-1.1.0-standalone.jar即可 . 那你应该好好去...... :)

  • 0

    你必须删除/usr/local/hive/lib/slf4j-log4j12-1.6.1.jar,因为hive会自动使用hadoop中存在的slf4j-log4j jar文件 .

    你也可以参考这里https://issues.apache.org/jira/browse/HIVE-6162

  • 0

    要解决此问题,请在所有配置单元节点上的/usr/iop/4.1.0.0/hive/bin/hive.distro文件中添加以下脚本行,

    CLASSPATH=`echo $CLASSPATH| sed 's/\/usr\/local\/hadoop\/lib\/slf4j\-log4j12\-1\.7\.10\.jar//g'`
    

    应在行后插入脚本

    if $cygwin; then
    CLASSPATH=`cygpath -p -w "$CLASSPATH"`
    CLASSPATH=${CLASSPATH};${AUX_CLASSPATH}
    else
    CLASSPATH=${CLASSPATH}:${AUX_CLASSPATH}
    fi
    

    警告将不再出现 .

    http://www-01.ibm.com/support/docview.wss?uid=swg21971864

  • 0

    在警告中列出的2个SLF4J绑定中,您需要从类路径中排除其中一个 .

    即使这是一个警告SLF4J将选择一个日志框架/实现并与其绑定 - 绑定由JVM确定,并且通常被认为是随机函数 .

  • 4

    你需要删除Hadoop和Hive之间的这些jar文件绑定

    • rm lib / hive-jdbc-2.0.0-standalone.jar

    • rm lib / log4j-slf4j-impl-2.4.1.jar

相关问题