[英]java.lang.ClassNotFoundException: org.apache.hive.service.cli.HiveSQLException
[英]org.apache.hive.service.cli.HiveSQLException: java.lang.NoClassDefFoundError: org/apache/hadoop/ipc/CallerContext$Builder
我正在嘗試將我的hive jdbc客戶端連接到hiveserver2。 我正在使用以下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.
但是當我使用以下代碼啟動我的jdbc客戶端時:
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))
它給了我以下例外:
org.apache.hive.service.cli.HiveSQLException:org上的org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:256)中的java.lang.NoClassDefFoundError:org / apache / hadoop / ipc / CallerContext $ Builder org.apache.hive.jdbc.HiveStatement.execute中的.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:242)(HiveStatement.java:254)
任何人都可以幫助我找出這個或解決方案的原因。
提前致謝。
這可能由於多種原因而發生: -
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.