I installed hive and hadoop in windows as per the link. I can able to create tables and load data in hive but when I tried to start the hiveserver2 using command
hive --service hiveserver2
Facing the below exception. Metastore is also up and running
My hive version - 3.1.2 Hdfs version - 3.3.2 java - 1.8
Commands I used in admin mode 1st (Starting hdfs) -> start-all.cmd 2nd (starting metastore) -> hive --service metastore (From $hive_home/bin dir) 3rd (starting hiveserver2) -> hive --service hiveServer2 (From $hive_home/bin dir)
ERROR
C:\apache-hive-3.1.2-bin\bin>hive --service hiveserver2
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/hadoop-3.3.2/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/apache-hive-3.1.2-bin/lib/log4j-slf4j-impl-2.10.0.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]
2023-06-13 12:16:01,063 INFO conf.HiveConf: Found configuration file file:/C:/apache-hive-3.1.2-bin/conf/hive-site.xml
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hive/org/apache/commons/cli/ParseException
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.lang.ClassNotFoundException: org.apache.hive.org.apache.commons.cli.ParseException
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 7 more
I have also checked the directories C:\apache-hive-3.1.2-bin\lib
, for the jar file commons-cli-1.2.jar it is there.. but I still facing above exception.
Currently I'm trying to connect to hive using java app(play framework), so I need hiveserver2 running.