[jira] [Commented] (HIVE-6050) Newer versions of JDBC driver does not work with older HiveServer2

2022-11-29 Thread TJ Banghart (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17640920#comment-17640920
 ] 

TJ Banghart commented on HIVE-6050:
---

Still experiencing this in 2022. Is there anyway to tell what driver versions 
-> HiveServer2 versions are compatible? I've been  JDBC 2.3.1 and it has worked 
well but recently tried to bump to 2.3.9. I am not able to update the server 
but would like to update the JDBC driver to prevent 
https://nvd.nist.gov/vuln/detail/CVE-2018-1282.

> Newer versions of JDBC driver does not work with older HiveServer2
> --
>
> Key: HIVE-6050
> URL: https://issues.apache.org/jira/browse/HIVE-6050
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, JDBC
>Affects Versions: 0.13.0
>Reporter: Szehon Ho
>Priority: Major
>
> HiveServer2 instance has to be upgraded before the JDBC drivers used by 
> applications are upgraded. If jdbc drivers are updated before HiveServer2 is 
> upgraded it will not be functional.
> Connect from JDBC driver of Hive 0.13 (TProtocolVersion=v4) to HiveServer2 of 
> Hive 0.10 (TProtocolVersion=v1), will return the following exception:
> {noformat}
> java.sql.SQLException: Could not establish connection to 
> jdbc:hive2://localhost:1/default: Required field 'client_protocol' is 
> unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:336)
>   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:158)
>   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
>   at java.sql.DriverManager.getConnection(DriverManager.java:571)
>   at java.sql.DriverManager.getConnection(DriverManager.java:187)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.getConnection(MyTestJdbcDriver2.java:73)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.init(MyTestJdbcDriver2.java:49)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>   at 
> org.junit.runners.$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>   at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
> Caused by: org.apache.thrift.TApplicationException: Required field 
> 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>   at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:327)
>   ... 37 more
> {noformat}
> On code analysis, it looks like the 'client_protocol' scheme is a ThriftEnum, 
> which doesn't seem to be backward-compatible. Look at the code path in the 
> generated file 'TOpenSessionReq.java', method 
> TOpenSessionReqStandardScheme.read():
> 1. The method will call 'TProtocolVersion.findValue()' on the thrift 
> protocol's byte stream, which returns null if the client is sending an enum 
> value unknown to the server. (v4 is unknown to 

[jira] [Commented] (HIVE-6050) Newer versions of JDBC driver does not work with older HiveServer2

2016-12-01 Thread Furcy Pin (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15711624#comment-15711624
 ] 

Furcy Pin commented on HIVE-6050:
-

Hi,

I ran into the same problem, and found a workaround for my setup, so I wanted 
to share it.

I have an application that uses hive-cli 1.2.0 (because of Spark) and that 
sends queries to our cluster via hive-jdbc.
Our cluster is still stuck in 1.1.0 (thank you Cloudera) and I ran into this 
issue when talking with the v1.2.0 jdbc client to the v1.1.0 jdbc server.

I managed to make everything work with the following dependency setup (sbt 
syntax):

{code}
libraryDependencies += "org.apache.hive" % "hive-service" % "1.1.0"

libraryDependencies += "org.apache.hive" % "hive-jdbc" % "1.1.0"

libraryDependencies += "org.apache.hive" % "hive-cli" % "1.2.0" 
exclude("org.apache.hive", "hive-service")
{code}

The trick was that the {{client_protocol}} is not defined in {{hive-jdbc}} but 
in {{hive-service}}, so you must make sure that your client has the same 
version of {{hive-service}} than your server.

I didn't run into any other compatibility problem so far, but I don't guarantee 
that nothing will break when mixing two hive versions together...


> Newer versions of JDBC driver does not work with older HiveServer2
> --
>
> Key: HIVE-6050
> URL: https://issues.apache.org/jira/browse/HIVE-6050
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, JDBC
>Affects Versions: 0.13.0
>Reporter: Szehon Ho
>Priority: Blocker
>
> HiveServer2 instance has to be upgraded before the JDBC drivers used by 
> applications are upgraded. If jdbc drivers are updated before HiveServer2 is 
> upgraded it will not be functional.
> Connect from JDBC driver of Hive 0.13 (TProtocolVersion=v4) to HiveServer2 of 
> Hive 0.10 (TProtocolVersion=v1), will return the following exception:
> {noformat}
> java.sql.SQLException: Could not establish connection to 
> jdbc:hive2://localhost:1/default: Required field 'client_protocol' is 
> unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:336)
>   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:158)
>   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
>   at java.sql.DriverManager.getConnection(DriverManager.java:571)
>   at java.sql.DriverManager.getConnection(DriverManager.java:187)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.getConnection(MyTestJdbcDriver2.java:73)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.init(MyTestJdbcDriver2.java:49)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>   at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
> Caused by: org.apache.thrift.TApplicationException: Required field 
> 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>   at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
>   at 
> 

[jira] [Commented] (HIVE-6050) Newer versions of JDBC driver does not work with older HiveServer2

2016-02-09 Thread sanjiv singh (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15139249#comment-15139249
 ] 

sanjiv singh commented on HIVE-6050:


Any update on this ..we are facing same issue with 1.2.1.


> Newer versions of JDBC driver does not work with older HiveServer2
> --
>
> Key: HIVE-6050
> URL: https://issues.apache.org/jira/browse/HIVE-6050
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, JDBC
>Affects Versions: 0.13.0
>Reporter: Szehon Ho
>Priority: Blocker
>
> HiveServer2 instance has to be upgraded before the JDBC drivers used by 
> applications are upgraded. If jdbc drivers are updated before HiveServer2 is 
> upgraded it will not be functional.
> Connect from JDBC driver of Hive 0.13 (TProtocolVersion=v4) to HiveServer2 of 
> Hive 0.10 (TProtocolVersion=v1), will return the following exception:
> {noformat}
> java.sql.SQLException: Could not establish connection to 
> jdbc:hive2://localhost:1/default: Required field 'client_protocol' is 
> unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:336)
>   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:158)
>   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
>   at java.sql.DriverManager.getConnection(DriverManager.java:571)
>   at java.sql.DriverManager.getConnection(DriverManager.java:187)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.getConnection(MyTestJdbcDriver2.java:73)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.init(MyTestJdbcDriver2.java:49)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>   at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
> Caused by: org.apache.thrift.TApplicationException: Required field 
> 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>   at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:327)
>   ... 37 more
> {noformat}
> On code analysis, it looks like the 'client_protocol' scheme is a ThriftEnum, 
> which doesn't seem to be backward-compatible.  Look at the code path in the 
> generated file 'TOpenSessionReq.java', method 
> TOpenSessionReqStandardScheme.read():
> 1. The method will call 'TProtocolVersion.findValue()' on the thrift 
> protocol's byte stream, which returns null if the client is sending an enum 
> value unknown to the server.  (v4 is unknown to server)
> 2. The method will then call struct.validate(), which will throw the above 
> exception because of null version.  
> So doesn't look like the current backward-compatibility scheme will work.



--
This message was sent by Atlassian JIRA

[jira] [Commented] (HIVE-6050) Newer versions of JDBC driver does not work with older HiveServer2

2016-01-05 Thread michael sklyar (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15083268#comment-15083268
 ] 

michael sklyar commented on HIVE-6050:
--

I had this error: H060 Unable to open Hive session: 
org.apache.thrift.protocol.TProtocolException: Required field 
'serverProtocolVersion' is unset!

Did the trick for me:
   hadoop.proxyuser.hive.hosts=*
   hadoop.proxyuser.hive.groups=*

If you have ambari you can add the properties via:  
services->HDFS->configs->advanced->custom core-site
Than restart all(!) the affected the services.

Not sure how is it related to protocol version - at least the error message is 
definitely wrong. 

> Newer versions of JDBC driver does not work with older HiveServer2
> --
>
> Key: HIVE-6050
> URL: https://issues.apache.org/jira/browse/HIVE-6050
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, JDBC
>Affects Versions: 0.13.0
>Reporter: Szehon Ho
>Priority: Blocker
>
> HiveServer2 instance has to be upgraded before the JDBC drivers used by 
> applications are upgraded. If jdbc drivers are updated before HiveServer2 is 
> upgraded it will not be functional.
> Connect from JDBC driver of Hive 0.13 (TProtocolVersion=v4) to HiveServer2 of 
> Hive 0.10 (TProtocolVersion=v1), will return the following exception:
> {noformat}
> java.sql.SQLException: Could not establish connection to 
> jdbc:hive2://localhost:1/default: Required field 'client_protocol' is 
> unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:336)
>   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:158)
>   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
>   at java.sql.DriverManager.getConnection(DriverManager.java:571)
>   at java.sql.DriverManager.getConnection(DriverManager.java:187)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.getConnection(MyTestJdbcDriver2.java:73)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.init(MyTestJdbcDriver2.java:49)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>   at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
> Caused by: org.apache.thrift.TApplicationException: Required field 
> 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>   at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:327)
>   ... 37 more
> {noformat}
> On code analysis, it looks like the 'client_protocol' scheme is a ThriftEnum, 
> which doesn't seem to be backward-compatible.  Look at the code path in the 
> generated file 'TOpenSessionReq.java', method 
> TOpenSessionReqStandardScheme.read():
> 1. The method 

[jira] [Commented] (HIVE-6050) Newer versions of JDBC driver does not work with older HiveServer2

2015-11-15 Thread metrollsta (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15005848#comment-15005848
 ] 

metrollsta commented on HIVE-6050:
--

When will this be fixed? Or is there a workaround?

> Newer versions of JDBC driver does not work with older HiveServer2
> --
>
> Key: HIVE-6050
> URL: https://issues.apache.org/jira/browse/HIVE-6050
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2, JDBC
>Affects Versions: 0.13.0
>Reporter: Szehon Ho
>Priority: Blocker
>
> HiveServer2 instance has to be upgraded before the JDBC drivers used by 
> applications are upgraded. If jdbc drivers are updated before HiveServer2 is 
> upgraded it will not be functional.
> Connect from JDBC driver of Hive 0.13 (TProtocolVersion=v4) to HiveServer2 of 
> Hive 0.10 (TProtocolVersion=v1), will return the following exception:
> {noformat}
> java.sql.SQLException: Could not establish connection to 
> jdbc:hive2://localhost:1/default: Required field 'client_protocol' is 
> unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:336)
>   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:158)
>   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
>   at java.sql.DriverManager.getConnection(DriverManager.java:571)
>   at java.sql.DriverManager.getConnection(DriverManager.java:187)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.getConnection(MyTestJdbcDriver2.java:73)
>   at 
> org.apache.hive.jdbc.MyTestJdbcDriver2.init(MyTestJdbcDriver2.java:49)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>   at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
> Caused by: org.apache.thrift.TApplicationException: Required field 
> 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null)
>   at 
> org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
>   at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:160)
>   at 
> org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:147)
>   at 
> org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:327)
>   ... 37 more
> {noformat}
> On code analysis, it looks like the 'client_protocol' scheme is a ThriftEnum, 
> which doesn't seem to be backward-compatible.  Look at the code path in the 
> generated file 'TOpenSessionReq.java', method 
> TOpenSessionReqStandardScheme.read():
> 1. The method will call 'TProtocolVersion.findValue()' on the thrift 
> protocol's byte stream, which returns null if the client is sending an enum 
> value unknown to the server.  (v4 is unknown to server)
> 2. The method will then call struct.validate(), which will throw the above 
> exception because of null version.  
> So doesn't look like the current backward-compatibility scheme will work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)