Loading

hive:初始化报错

报错信息:

ava HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/2.3.1/libexec/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.8.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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]
Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:394)
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:370)
    at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60)

安装了hadoop 3 依赖 java11, hive 3.1.3依赖java8
解决方法:
将hadoop 3的java版本降低到java8即可

posted @ 2024-10-18 03:55  青山新雨  阅读(6)  评论(0编辑  收藏  举报