Hadoop Hive ClassNotFoundException org apache hive jdbc HiveDriver

0 votes

I have used this in my code:

 try {
       Class.forName("org.apache.hive.jdbc.HiveDriver");
     }

I am getting this error:

java.lang.ClassNotFoundException: org.apache.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 HiveJdbcClient.main(HiveJdbcClient.java:7)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Dec 11, 2018 in Big Data Hadoop by digger
• 26,740 points
5,460 views

1 answer to this question.

0 votes

You have to use the right dependency

<dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-jdbc</artifactId>
            <version>1.1.0</version>
</dependency>
answered Dec 11, 2018 by Omkar
• 69,210 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

Hive: org.apache.hadoop.security.AccessControlException Permission denied: user

This error is generally thrown when the ...READ MORE

answered Aug 1, 2019 in Big Data Hadoop by Waniku
2,777 views
+1 vote
1 answer

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

Hi@akhtar, This issue generally occurs when the memory ...READ MORE

answered Apr 17, 2020 in Big Data Hadoop by MD
• 95,440 points
29,774 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,598 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,205 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,724 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,283 views
0 votes
1 answer

Spark : java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStream

Create a spark-env.cmd file looking like this @echo off set ...READ MORE

answered Jan 2, 2019 in Big Data Hadoop by Omkar
• 69,210 points
11,396 views
0 votes
1 answer

Unable to instantiate org.apache.hadoop.hive

You might not have set the connector. ...READ MORE

answered Jan 25, 2019 in Big Data Hadoop by Omkar
• 69,210 points
1,486 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