1
java.lang.ClassNotFoundException: org.apache.hadoop.hive.jdbc.HiveDriver
    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)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.testdemo.TestFile.main(TestFile.java:13)

I have added all required jar files with in the library but results in same error

2
  • Did you add HiveDriver in the class path??? Commented Jan 12, 2016 at 4:40
  • Yes but it not works... Commented Jan 12, 2016 at 7:36

2 Answers 2

4

Add the hive-jdbc jar in your class-path.It will resolve your problem.

Sign up to request clarification or add additional context in comments.

Comments

2

java.lang.ClassNotFoundException means that a class is being referenced but not found.

The org.apache.hadoop.hive.jdbc.HiveDriver class is referenced in com.testdemo.TestFile.main, but com.testdemo.TestFile.main can not find org.apache.hadoop.hive.jdbc.HiveDriver. This is usually caused by they referenced class not being at the referenced location, or on the same layer of the project file.

Hope this helps.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.