3
votes

i am facing this issue while connecting talend open studio with hive. Below is the error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hive/service/cli/thrift/TCLIService$Iface at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at mtn_project.hive_test_0_1.hive_test.tHiveConnection_1Process(hive_test.java:353) at mtn_project.hive_test_0_1.hive_test.runJobInTOS(hive_test.java:674) at mtn_project.hive_test_0_1.hive_test.main(hive_test.java:523) Caused by: java.lang.ClassNotFoundException: org.apache.hive.service.cli.thrift.TCLIService$Iface 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) [statistics] disconnected at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 6 more

2
this issue is with your port you are connecting to. could you please verify it oncePreetyK

2 Answers

0
votes

NoClassDefFoundError usually indicates that certain libraries in your environment are missing.

See for example Connect Hive thorugh Java JDBC

In your case it might be a possibility that you need the Big Data edition.

0
votes

I had the same error message and using following jars helped me. They're located in the $SPARK_HOME/jars folder:

commons-logging-1.1.3.jar  
hadoop-common-3.0.0.jar     
hive-jdbc-1.2.1.spark2.jar  
hive-metastore-1.2.1.spark2.jar  
httpclient-4.5.2.jar  
libthrift-0.9.3.jar
guava-14.0.1.jar           
hive-exec-1.2.1.spark2.jar  
hive-service-1.2.2.jar           
httpcore-4.4.4.jar