You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Avy Singh <av...@gmail.com> on 2017/04/01 18:32:55 UTC

org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError: org/apache/hadoop/ipc/CallerContext$Builder

I am trying to connect my hive jdbc client to hiveserver2. i am using
following maven

<dependency>
  <groupId>org.apache.hive</groupId>
  <artifactId>hive-service</artifactId>
  <version>1.2.1000.2.4.2.12-1</version></dependency>

hiveserver2.start() started my hiveserver2.

but when i start my jdbc client with followin code :

val con: Connection = DriverManager
      .getConnection("jdbc:hive2://localhost:10000/default", "", "")
    val stmt: Statement = con.createStatement
stmt.execute("create table if not exists student (id int))

it gives me following exception :

org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError:
org/apache/hadoop/ipc/CallerContext$Builder at
org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:256)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:242) at
org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254)

Can anybody either help me to identify the reason of this or solution
please.

Thanks in advance.