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,680 points
608 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
• 69,030 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
• 13,180 points
201 views
0 votes
1 answer

Sqoop getting error while connecting to MySQL

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

answered Feb 7, 2019 in Big Data Hadoop by Omkar
• 69,030 points
172 views
0 votes
1 answer

JDBC connection to Hive using TLS/SSL

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

answered May 31, 2019 in Big Data Hadoop by Karan
254 views
0 votes
1 answer

Error while Loading data to Hive.

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

answered Jul 29, 2019 in Big Data Hadoop by Quill
151 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
• 69,030 points
3,787 views
0 votes
1 answer

Hive JDBC driver URL format and driver class.

For Hive server 1, the URL format ...READ MORE

answered May 31, 2019 in Big Data Hadoop by Adi
197 views
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,450 points
1,523 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,450 points
1,014 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
• 69,030 points
150 views
0 votes
1 answer

Error connecting hive using python pyhs2

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

answered Jan 11, 2019 in Big Data Hadoop by Omkar
• 69,030 points
811 views