0

I have installed Hadoop, HIVE, and MYSQL Server was already installed.

I followed these two links to install Hadoop & Hive. I configured .sh, XML files as mentioned on those links, and I get this error when I start a hive.

https://medium.com/analytics-vidhya/hadoop-single-node-cluster-setup-b11b957681f2 https://blog.accubits.com/hive-installation-on-ubuntu-18-04-mysql-metastore/

Any help is greatly appreciated.

user1@john-desktop:/usr/local/hive/bin$ hive SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-reload4j-1.7.36.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]
Hive Session ID = 03c4d523-7dbc-4ce9-9b5e-d7643f505c7c
Exception in thread "main" java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:413)
    at org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:389)
    at org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
user5889117
  • 107
  • 1
  • 8
  • SLF4J: Found binding problem is resolved. But "Exception in thread "main" java.lang.ClassCastException" is still there. – user5889117 Mar 17 '23 at 00:51
  • 1
    What versions of java and hive are you using? – earandap Mar 17 '23 at 04:27
  • By the way, Hive cli is not recommended, and instead you should be using beeline command – OneCricketeer Mar 17 '23 at 13:11
  • Hive = 3.1.3 and Java = java-11-openjdk-amd64 – user5889117 Mar 17 '23 at 16:47
  • not able to connect hive metastore on MySQL server using beeline. ------------------------------------------------------------------------------------------- 2023-03-17 12:29:07,704 WARN jdbc.HiveConnection: Failed to connect to localhost:45505 Unknown HS2 problem when communicating with Thrift server. Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:45505/hivemetastoredb: Invalid status 74 (state=08S01,code=0) – user5889117 Mar 17 '23 at 17:43
  • I also tried from this link, but no luck after installing Java 8. https://stackoverflow.com/questions/56543542/unable-to-launch-hive-on-ubuntu?rq=1 – user5889117 Mar 17 '23 at 20:38

0 Answers0