Springboot 1.5.2 integrated hive error.

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

Nicolas Fouché commented on HIVE-2935:
--------------------------------------

Using CDH 4.1.2, which includes this patch. I think there's a problem with hive-jdbc which includes a JDBC driver for the two version of hiveserver.

For the first version of hiveserver, hive-jdbc-0.9.0-cdh4.1.2 depends on libthrift-1.5.0, which defines org.apache.thrift.TServiceClient as an Interface.

For hiveserver2, hive-jdbc-0.9.0-cdh4.1.2 depends on hive-service-0.9.0-cdh4.1.2, which depends on hive-service-0.9.0-cdh4.1.2. The later seems to include code from libthrift, and defines org.apache.thrift.TServiceClient as an abstract class.

Thus this happens:

java.lang.IncompatibleClassChangeError: class org.apache.hive.service.cli.thrift.TCLIService$Client has interface org.apache.thrift.TServiceClient as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:157)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:96)

Of course, I just have to remove libthrift from my libpath. But I just wanted to make Carl Steinbach know. (I used maven-dependency-plugin to get all dependent JARs, without thinking about what would be useless, or incompatible)
               
> Implement HiveServer2
> ---------------------
>
>                 Key: HIVE-2935
>                 URL: https://issues.apache.org/jira/browse/HIVE-2935
>             Project: Hive
>          Issue Type: New Feature
>          Components: Server Infrastructure
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>              Labels: HiveServer2
>         Attachments: beelinepositive.tar.gz, HIVE-2935.1.notest.patch.txt, HIVE-2935.2.notest.patch.txt, HIVE-2935.2.nothrift.patch.txt, HS2-changed-files-only.patch, HS2-with-thrift-patch-rebased.patch 解决办法。去除apach 下冲突thrift.jar包 <!-- https://mvnrepository.com/artifact/org.apache.thrift/libthrift -->   <exclusion>      <groupId>org.apache.thrift</groupId>      <artifactId>libthrift</artifactId>    </exclusion> >












Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326626636&siteId=291194637
Recommended