I try to run this sample, but it throw a "NoClassDefFoundError: HiveServerException".
I search this class on the maven websit, finaly I found a hadoop-hive-cdh jar.
But my server is not CDH,and I can't find the answer.
my properties:
2.5.0.RELEASE2.7.52.3.24.3.9.RELEASE
```
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Project/%e5%a4%a7%e6%95%b0%e6%8d%ae/all%20lib/hadoop/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Project/%e5%a4%a7%e6%95%b0%e6%8d%ae/all%20lib/hive/log4j-slf4j-impl-2.6.2.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]
15:05:45,574 INFO ingframework.samples.hadoop.hive.HiveApp: 31 - Hive Application Running
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/service/HiveServerException
at org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:267)
at org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:264)
at org.springframework.data.hadoop.hive.HiveTemplate.execute(HiveTemplate.java:83)
at org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:264)
at org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:252)
at org.springframework.data.hadoop.hive.HiveTemplate.query(HiveTemplate.java:142)
at org.springframework.data.hadoop.hive.HiveTemplate.query(HiveTemplate.java:115)
at org.springframework.samples.hadoop.hive.HiveApp.main(HiveApp.java:35)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServerException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
15:05:52,497 INFO t.support.ClassPathXmlApplicationContext: 984 - Closing org.springframework.context.support.ClassPathXmlApplicationContext@15761df8: startup date [Thu Jan 31 15:05:40 CST 2019]; root of context hierarchy
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [util.c:840]
```
Help ... please.
I try to run this sample, but it throw a "NoClassDefFoundError: HiveServerException". I search this class on the maven websit, finaly I found a hadoop-hive-cdh jar. But my server is not CDH,and I can't find the answer.
my properties: