Add JAR works with HDFS, though perhaps not with ODBC drivers.

ADD JAR hdfs://<namenode_hostname>:8020/hive_jars/hive-contrib-2.1.1.jar
should work (depending on your nn port and confirm this file exists)
Alternative syntax
ADD JAR hdfs:/hive_jars/hive-contrib-2.1.1.jar

The ODBC driver could be having an issue with the forward slashes.

The guaranteed method is to create a permanent association by adding the JAR to hive/lib or hadoop/lib on hiveserver2 node.
Copying to hive-client/auxlib/ and restarting Hive is an option.
Adding following property to is an option

There may be a trace function for your ODBC driver to see a more detailed error.

Some ODBC drivers may not support the ADD JAR syntax.

On February 23, 2018 at 3:27 PM Jörn Franke <> wrote:

Add jar works only with local files on the Hive server.

On 23. Feb 2018, at 21:08, Andy Srine <> wrote:


Is ADD JAR from HDFS (ADD JAR hdfs:///hive_jars/hive-contrib-2.1.1.jar;) supported in hiveserver2 via an ODBC connection? 

Some relevant points:
  • I am able to do it in Hive 2.1.1 via JDBC (beeline), but not via an ODBC client.
  • In Hive 1.2.1, I can add a jar from the local node, but not a JAR on HDFS.
  • Some old blogs online say HiveServer2 doesn't support "ADD JAR " period. But thats not what I experience via beeline.
Let me know your thoughts and experiences.



Reply via email to