Stack Exchange
java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServerException
i have refer below link to connect hive through spring application.
http://noushinb.blogspot.in/2014/04/spring-hive.html
But got below exception.
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

How to solve this exception.Thanks for giving yours valuable time.

If you're using Maven try: mvn install

i have tried that one and my project build successfully,while running the application i got this exception
