[ https://issues.apache.org/jira/browse/HIVE-21237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935733#comment-16935733 ]
Dawood commented on HIVE-21237: ------------------------------- Getting the same error even after removing metastore_db {noformat} [root@hive apache-hive-2.3.6-bin]# rm -rf ${HIVE_HOME}/metastore_db [root@hive apache-hive-2.3.6-bin]# bin/schematool -dbType derby -initSchema --verbose SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/apache-hive-2.3.6-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/hadoop-3.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Metastore connection URL: jdbc:derby://hive:1527/metastore_db;create=true Metastore Connection Driver : org.apache.derby.jdbc.ClientDriver Metastore connection User: APP Starting metastore schema initialization to 2.3.0 Initialization script hive-schema-2.3.0.derby.sql Connecting to jdbc:derby://hive:1527/metastore_db;create=true Connected to: Apache Derby (version 10.15.1.3 - (1853019)) Driver: Apache Derby Network Client JDBC Driver (version 10.11.1.1 - (1616546)) Transaction isolation: TRANSACTION_READ_COMMITTED 0: jdbc:derby://hive:1527/metastore_db> !autocommit on Autocommit status: true 0: jdbc:derby://hive:1527/metastore_db> CREATE FUNCTION "APP"."NUCLEUS_ASCII" (C CHAR(1)) RETURNS INTEGER LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA CALLED ON NULL INPUT EXTERNAL NAME 'org.datanucleus.store.rdbms.adapter.DerbySQLFunction.ascii' Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000) Closing: 0: jdbc:derby://hive:1527/metastore_db;create=true org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !! Underlying cause: java.io.IOException : Schema script failed, errorcode 2 org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !! at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:590) at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:563) at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1145) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.hadoop.util.RunJar.run(RunJar.java:323) at org.apache.hadoop.util.RunJar.main(RunJar.java:236) Caused by: java.io.IOException: Schema script failed, errorcode 2 at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:980) at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:959) at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:586) ... 8 more *** schemaTool failed *** {noformat} [~yumwang] Could you please share me the document or a right link to refer - configuring Hive on top of Hadoop node. > [JDK 11] SessionState can't be initialized due to classloader problem > --------------------------------------------------------------------- > > Key: HIVE-21237 > URL: https://issues.apache.org/jira/browse/HIVE-21237 > Project: Hive > Issue Type: Sub-task > Affects Versions: 3.1.1 > Environment: JDK11, Hadoop-3, Hive 3.1.1 > Reporter: Uma Maheswara Rao G > Priority: Major > > When I start Hive with JDK11 > {{2019-02-08 22:29:51,500 INFO SessionState: Hive Session ID = > cecd9c34-d61a-44d0-9e52-a0a7d6413e49 > Exception in thread "main" java.lang.ClassCastException: class > jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class > java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and > java.net.URLClassLoader are in module java.base of loader 'bootstrap') > at > org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:410) > at > org.apache.hadoop.hive.ql.session.SessionState.<init>(SessionState.java:386) > at > org.apache.hadoop.hive.cli.CliSessionState.<init>(CliSessionState.java:60) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at org.apache.hadoop.util.RunJar.run(RunJar.java:323) > at org.apache.hadoop.util.RunJar.main(RunJar.java:236)}} -- This message was sent by Atlassian Jira (v8.3.4#803005)