Support Questions
Find answers, ask questions, and share your expertise

client_protocol' is unset

client_protocol' is unset


I am using horton version HDP-

I am trying to connect to hive using java client. I fail on:

org.apache.thrift.TApplicationException: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})
        at ~[libthrift-0.9.3.jar!/:0.9.3]
        at org.apache.thrift.TServiceClient.receiveBase( ~[libthrift-0.9.3.jar!/:0.9.3]
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_OpenSession( ~[hive-service-rpc-2.1.1.jar!/:2.1.1]
        at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession( ~[hive-service-rpc-2.1.1.jar!/:2.1.1]
        at org.apache.hive.jdbc.HiveConnection.openSession( ~[hive-jdbc-2.1.1.jar!/:2.1.1]
        ... 15 common frames omitted


The hive-jdbc version as you can see is 2.1.1. I read this may be a mismatch between client and server versions. I couldn't find anywhere what is the correct mapping to my server version.

It seems to work with hive-jdbc 2.0.0 - but that's quite old. How can I use latest?