ERROR jdbc.HiveConnection: Error opening session Hive ERROR jdbc.HiveConnection: Error opening session Hive hadoop hadoop

ERROR jdbc.HiveConnection: Error opening session Hive


org.apache.thrift.TApplicationException: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default}) at org.apache.thrift.TApplicationException.read(TApplicationException.java:111)

This error mostly occurs if you have version mismatch between your hive and hive-jdbc. Please check if both the versions match.

Please refer this for more information.


This happens when a new version of JDBC driver is used against older version of HiveServer2.Use a jdbc driver that is same version as server (preferred), or an version that is older than the server.

The issue is tracked in https://issues.apache.org/jira/browse/HIVE-6050


"client_protocol" field is available in hive 1.1 version.You need to add hive-service-1.1.0.jar in classpath.

I hope your problem would get solved.