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 22, 2018 in Big Data Hadoop by digger
• 26,740 points
1,851 views

1 answer to this question.

0 votes

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

answered Nov 22, 2018 by Omkar
• 69,220 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 4, 2018 in Big Data Hadoop by Vardhan
• 13,150 points
996 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,220 points
1,426 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
2,374 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
1,254 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 Dec 1, 2018 in Big Data Hadoop by Omkar
• 69,220 points
8,622 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
2,046 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,490 points
2,673 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,490 points
2,546 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,220 points
848 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,220 points
2,384 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP