Code Repositories

Find and share code repositories
Celebrating as our community reaches 100,000 members! Thank you!
Repo Description

Sometimes you want to connect your favorite database query or visualization tool to Hive. I've found that this can be quite cumbersome, typically requiring you to copy jars from the Hadoop cluster to some place locally that can be read by your tool. The goal of this simple maven project is to easily pull the required jars into a single place locally and create an "uber" or "standalone" jar that can be referenced by any JDBC compliant tool.

Binaries can be downloaded here:

Updated for HDP 2.5.3 and Kerberos on 12/19/16

Repo Info
Github Repo URL
Github account name timveil
Repo name hive-jdbc-uber-jar
Super Mentor

Thanks @Tim Veil for sharing this. Is it compatiable with HDP 2.4.x?


@Neeraj Sabharwal The jar was just updated for HDP 2.4.2 and supports HDP releases back to 2.2. See this link for all relevant binaries:

Super Guru

But we already have the client jar? hive-jdbc-xxx-standalone.jar. I know for some reason they forgot to include two other jars in there but if you copy all three it should work. ( missing is hadoop-commons and commons-logging. )

Would be good to fix the standalone jar to include these two small files as well though.


Thats right. There is a *standalone.jar that ships with hive that should do this but, as you correctly pointed out, does not. This repo works around that problem until it can be properly resolved. In my testing I could not get any of my favorite JDBC clients to work when using the original standalone jar by itself as I was hoping I could. I wanted an easy way to bundle all dependencies into a single jar. I've also made some effort to cleanup the logging dependencies by relying solely on SLF4J and its bindings.

Super Guru

yeah it always worked for me after adding the three jars I mentioned. ( commons-logging, hadoop-common and hive-jdbc ) still annoying thjat you need the other two but not too onerous. Nevertheless your project is cool.


I've updated the "uber" jar with support for HDP 2.5. See


I tried various options but still getting this error.

Connection con = DriverManager.getConnection("jdbc:hive2://;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2");
Connection con2 = DriverManager.getConnection("jdbc:hive2://

connectString= sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@307f6b8c 2018-01-08 22:47:08,080 INFO [main-SendThread(] zookeeper.ClientCnxn ( - Opening socket connection to server Will not attempt to authenticate using SASL (unknown error) 2018-01-08 22:47:23,131 ERROR [main] curator.ConnectionState ( - Connection timed out for connection string ( and timeout (15000) / elapsed (15093) org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss at org.apache.curator.ConnectionState.checkTimeouts( at org.apache.curator.ConnectionState.getZooKeeper( at org.apache.curator.CuratorZookeeperClient.getZooKeeper( at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper( at org.apache.curator.framework.imps.GetChildrenBuilderImpl$ at org.apache.curator.framework.imps.GetChildrenBuilderImpl$ at org.apache.curator.RetryLoop.callWithRetry( at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground( at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath( at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath( at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.configureConnParams( at org.apache.hive.jdbc.Utils.configureConnParams( at org.apache.hive.jdbc.Utils.parseURL( at org.apache.hive.jdbc.HiveConnection.<init>( at org.apache.hive.jdbc.HiveDriver.connect( at java.sql.DriverManager.getConnection( at java.sql.DriverManager.getConnection( at HiveJDBC.main(

webinar banner
Version history
Last update:
‎05-16-2016 09:05 PM
Updated by:
meetups banner