Yuming Wang created HIVE-22206:
----------------------------------
Summary: Failed to "add jar" with hiveserver2 on JDK 11
Key: HIVE-22206
URL: https://issues.apache.org/jira/browse/HIVE-22206
Project: Hive
Issue Type: Bug
Components: HiveServer2
Affects Versions: 4.0.0
Reporter: Yuming Wang
How to reproduce:
{code:sh}
export JAVA_HOME=/usr/lib/jdk-11.0.3
export PATH=${JAVA_HOME}/bin:${PATH}
rm -rf lib/hive-hcatalog-core-4.0.0-SNAPSHOT.jar
bin/hiveserver2
{code}
{code:sql}
bin/beeline -u jdbc:hive2://localhost:10000
add jar /root/opensource/apache-hive/hive-hcatalog-core-4.0.0-SNAPSHOT.jar;
CREATE TABLE addJar(key string) ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe';
{code}
{noformat}
0: jdbc:hive2://localhost:10000> add jar
/root/opensource/apache-hive/packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/hive-hcatalog-core-4.0.0-SNAPSHOT.jar;
INFO : Added
[/root/opensource/apache-hive/packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/hive-hcatalog-core-4.0.0-SNAPSHOT.jar]
to class path
INFO : Added resources:
[/root/opensource/apache-hive/packaging/target/apache-hive-4.0.0-SNAPSHOT-bin/apache-hive-4.0.0-SNAPSHOT-bin/hive-hcatalog-core-4.0.0-SNAPSHOT.jar]
No rows affected (0.018 seconds)
0: jdbc:hive2://localhost:10000> CREATE TABLE addJar(key string) ROW FORMAT
SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';
INFO : Compiling
command(queryId=root_20190914215356_211fe827-960f-4556-ad5b-feb4ad474a8c):
CREATE TABLE addJar(key string) ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe'
INFO : Concurrency mode is disabled, not creating a lock manager
INFO : Semantic Analysis Completed (retrial = false)
INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO : Completed compiling
command(queryId=root_20190914215356_211fe827-960f-4556-ad5b-feb4ad474a8c); Time
taken: 0.006 seconds
INFO : Concurrency mode is disabled, not creating a lock manager
INFO : Executing
command(queryId=root_20190914215356_211fe827-960f-4556-ad5b-feb4ad474a8c):
CREATE TABLE addJar(key string) ROW FORMAT SERDE
'org.apache.hive.hcatalog.data.JsonSerDe'
INFO : Starting task [Stage-0:DDL] in serial mode
ERROR : Failed
org.apache.hadoop.hive.ql.metadata.HiveException: Cannot validate serde:
org.apache.hive.hcatalog.data.JsonSerDe
at
org.apache.hadoop.hive.ql.ddl.DDLUtils.validateSerDe(DDLUtils.java:118)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hadoop.hive.ql.ddl.table.creation.CreateTableDesc.toTable(CreateTableDesc.java:772)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hadoop.hive.ql.ddl.table.creation.CreateTableOperation.execute(CreateTableOperation.java:57)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.ddl.DDLTask.execute(DDLTask.java:90)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:103)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2188)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1840)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1508)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1268)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1262)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:160)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:233)
~[hive-service-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation.access$600(SQLOperation.java:88)
~[hive-service-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:332)
~[hive-service-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at javax.security.auth.Subject.doAs(Subject.java:423) ~[?:?]
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
~[hadoop-common-3.2.0.jar:?]
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:350)
~[hive-service-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassNotFoundException: Class
org.apache.hive.hcatalog.data.JsonSerDe not found
at
org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2499)
~[hadoop-common-3.2.0.jar:?]
at
org.apache.hadoop.hive.ql.ddl.DDLUtils.validateSerDe(DDLUtils.java:112)
~[hive-exec-4.0.0-SNAPSHOT.jar:4.0.0-SNAPSHOT]
... 23 more
ERROR : FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.ddl.DDLTask. Cannot validate serde:
org.apache.hive.hcatalog.data.JsonSerDe
INFO : Completed executing
command(queryId=root_20190914215356_211fe827-960f-4556-ad5b-feb4ad474a8c); Time
taken: 0.003 seconds
INFO : Concurrency mode is disabled, not creating a lock manager
Error: Error while processing statement: FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.ddl.DDLTask. Cannot validate serde:
org.apache.hive.hcatalog.data.JsonSerDe (state=08S01,code=1)
0: jdbc:hive2://localhost:10000>
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)