java.lang.ClassNotFoundException:org.apache.hadoop.hive.service.HiveServerException

时间:2017-06-15 07:56:57

标签: java spring hadoop hive

我在下面的链接中提到了通过spring应用程序连接hive。

http://noushinb.blogspot.in/2014/04/spring-hive.html

但是低于例外。

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 com.test.hive.repository.TestRepository.showTables(TestRepository.java:17)
    at com.test.hive.service.CustomService.showTables(CustomService.java:19)
    at com.test.hive.App.main(App.java:30)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServerException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 10 more

如何解决这个异常。谢谢给你宝贵的时间。

0 个答案:

没有答案