Required field 'client_protocol' is unset

后端 未结 4 1305
日久生厌
日久生厌 2020-12-17 09:02

I am using Hive 0.12, and I\'m trying the JDBC from apache. When I try to run the code, I get apache.thrift.TApplicationException.

import java.sql.SQLExcepti         


        
相关标签:
4条回答
  • 2020-12-17 09:32

    Got same issue. It works if you set

    hive JDBC Maven Repo version as 1.1.0 .

    Check this jira. Newest hive-jdbc version is not supported with HIve 0.13. https://issues.apache.org/jira/browse/HIVE-6050

    Add this in your pom.

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-jdbc</artifactId>
      <version>1.1.0</version>
      <classifier>standalone</classifier>
    </dependency>
    
    0 讨论(0)
  • 2020-12-17 09:36

    I have faces same issue. I fixed this by following below steps.

    <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-jdbc</artifactId>
        <version>1.1.0</version>
        <classifier>standalone</classifier>
        <exclusions>
            <exclusion>
                <groupId>org.eclipse.jetty.aggregate</groupId>
                <artifactId>*</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    
    • Make sure that, you add above dependency.
    • Class.forName("org.apache.hive.jdbc.HiveDriver"); Add this before calling DriverManager.getConnection(url);
    • Represent hive url by IP instead of hostname.
    0 讨论(0)
  • 2020-12-17 09:49

    This indicates a version mismatch between client and server, namely that the client is newer than the server, which is your case.

    0 讨论(0)
  • 2020-12-17 09:54

    Guys even I faced the same issue and go the solution by doing the following steps

    Step 01:- Include the Hive lib jars on yours eclipse(which ever might be the IDE) by using the below link.

    http://mirrors.supportex.net/apache/hive/hive-1.0.1/ (apache-hive-1.0.1-bin.tar.gz)

    Step 02: add hadoop-core-1.1.0 jar

    as everyone mentioned this error occurs due to the version mismatch with hadoop standalone and hadoop core.

    0 讨论(0)
提交回复
热议问题