Error while connecting to Hive using Java JDBC

0 votes

I am trying to connect to Hive using Java JDBC but I am getting driver error:

java.lang.ClassNotFoundException: org.apache.hadoop.hive.jdbc.HiveDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at HiveJdbcClient.main(HiveJdbcClient.java:14)

How to solve this?

Nov 21, 2018 in Big Data Hadoop by digger
• 26,600 points
172 views

1 answer to this question.

0 votes

Use ​org.apache.hive.jdbc.HiveDriver as your driver. It should work

answered Nov 21, 2018 by Omkar
• 68,480 points

Related Questions In Big Data Hadoop

+3 votes
1 answer

Getting Connection Error while loading data into table using cloudera hive

Hey Nafeesa, Itseems that Hive is not able ...READ MORE

answered Oct 3, 2018 in Big Data Hadoop by Vardhan
• 12,840 points
87 views
0 votes
1 answer

Sqoop getting error while connecting to MySQL

Have you set a password for MySQL? ...READ MORE

answered Feb 7 in Big Data Hadoop by Omkar
• 68,480 points
60 views
0 votes
1 answer

JDBC connection to Hive using TLS/SSL

Hi. The properties are right but in ...READ MORE

answered May 31 in Big Data Hadoop by Karan
57 views
0 votes
1 answer

Error while Loading data to Hive.

Your data node is not running that ...READ MORE

answered Jul 29 in Big Data Hadoop by Quill
46 views
0 votes
1 answer

Hive:Unable to insert values to an array column using "insert".

make a dummy table which has at least one row. INSERT ...READ MORE

answered Nov 30, 2018 in Big Data Hadoop by Omkar
• 68,480 points
1,611 views
0 votes
1 answer
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,350 points
966 views
0 votes
1 answer

Hadoop giving java.io.IOException, in mkdir Java code.

I am not sure about the issue. ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 13,350 points
512 views
0 votes
1 answer

Getting some warning/error while loading java file using Hbase commands

In your code, you have set some ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 68,480 points
80 views
0 votes
1 answer

Error connecting hive using python pyhs2

Seems like the host IP is not ...READ MORE

answered Jan 11 in Big Data Hadoop by Omkar
• 68,480 points
296 views