AnsweredAssumed Answered

Connecting to HiveServer2 though JDBC client throws NoClassDefFoundError

Question asked by ssat_bi on Aug 5, 2014
Latest reply on Aug 5, 2014 by ssat_bi
We are able to have HiveServer2 up and running behind a MySQL metastore and connect through both Beeline and ODBC. If we try to connect to HiveServer2 through a JDBC client (Squirrel SQL client or DbVisualizer), it fails. Here is the error message from DbVisualizer.

An error occurred while establishing the connection:

Details:
   Type: java.lang.reflect.UndeclaredThrowableException

Stack Trace:
<pre>
java.lang.reflect.UndeclaredThrowableException
   at $Proxy4.connect(Unknown Source)
   at com.onseven.dbvis.db.A.G.ľ(Z:1778)
   at com.onseven.dbvis.db.A.G.į(Z:2467)
   at com.onseven.dbvis.db.A.E.į(Z:2416)
   at com.onseven.dbvis.db.A.D.execute(Z:808)
   at com.onseven.dbvis.J.B.Y.Ä(Z:1386)
   at com.onseven.dbvis.J.B.K.Ă(Z:1374)
   at com.onseven.dbvis.J.B.K.doInBackground(Z:1521)
   at javax.swing.SwingWorker$1.call(Unknown Source)
   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   at javax.swing.SwingWorker.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/thrift/transport/TTransportException
   at com.onseven.dbvis.g.B.F$A.call(Z:210)
   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   ... 3 more
Caused by: java.lang.NoClassDefFoundError: org/apache/thrift/transport/TTransportException
   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.onseven.dbvis.g.B.D.Ä(Z:1413)
   at com.onseven.dbvis.g.B.F$A.call(Z:1474)
   ... 5 more
Caused by: java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransportException
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 12 more

Outcomes