zoukankan      html  css  js  c++  java
  • 【已解决】初始化 Hive 元数据库报错slf4j-log4j12-1.7.25.jar包冲突

    • 错误log描述

    [root@hadoop102 hive]# schematool -initSchema -dbType mysql -verbose
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/opt/module/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/opt/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]
    Metastore connection URL: jdbc:mysql://hadoop102:3306/metastore?useSSL=false
    Metastore Connection Driver : com.mysql.jdbc.Driver
    Metastore connection User: root
    org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver
    Underlying cause: java.lang.ClassNotFoundException : com.mysql.jdbc.Driver
    org.apache.hadoop.hive.metastore.HiveMetaException: Failed to load driver

    • 问题原因

    系统配置的路径中找到两个slf4j-log4j12-1.7.25.jar不同版本的jar包。

    高版本可以向下兼容,可以cd进入低版本jar包的路径下,修改包名或者直接remove移除。

    • 解决办法

      cd /opt/module/hadoop-3.1.3/share/hadoop/common/lib/

      rm -rf slf4j-log4j12-1.7.25.jar

     

     

     问题解决!

  • 相关阅读:
    Java多线程:ThreadLocal
    selenium安装环境
    http常用标签
    http与https区别,get与post请求区别
    测试评审清单
    python面向对象之方法
    python正则之模式re.I re.M
    python 正则之字母匹配
    python正则之特殊表达式 .*?{}
    python正则之match search findall
  • 原文地址:https://www.cnblogs.com/rainbow-1/p/15346313.html
Copyright © 2011-2022 走看看