[
https://issues.apache.org/jira/browse/HIVE-11287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906074#comment-14906074
]
Chen Xin Yu commented on HIVE-11287:
------------------------------------
Recreate the issue as below, will take a look at this issue.
for
<property>
<name>
javax.jdo.option.ConnectionURL
</name>
<value>
jdbc:mysql://host/hive?createDatabaseIfNotExist=true
</value>
</property>
export HIVE_CONF_DIR=$HIVE_CONF_DIR; schematool -dbType mysql -userName hive
-passWord xxx -initSchema -verbose
exception as below:
Metastore connection URL:
jdbc:mysql://host/hive?createDatabaseIfNotExist=true
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema
version.
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema
version.
at
org.apache.hive.beeline.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:77)
at
org.apache.hive.beeline.HiveSchemaTool.getConnectionToMetastore(HiveSchemaTool.java:113)
at
org.apache.hive.beeline.HiveSchemaTool.testConnectionToMetastore(HiveSchemaTool.java:159)
at
org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:257)
at
org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:243)
at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:473)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.sql.SQLException: No suitable driver found for
jdbc:mysql://host/hive?createDatabaseIfNotExist=true
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at
org.apache.hive.beeline.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:73)
... 11 more
*** schemaTool failed ***
> Hive Metastore does not tolerate leading spaces in JDBC url
> -----------------------------------------------------------
>
> Key: HIVE-11287
> URL: https://issues.apache.org/jira/browse/HIVE-11287
> Project: Hive
> Issue Type: Bug
> Components: Configuration, Metastore
> Affects Versions: 1.2.0, 1.3.0, 2.0.0
> Reporter: Gopal V
> Assignee: Chen Xin Yu
> Priority: Minor
> Labels: newbie
>
> The hive metastore is configured with
> {code}
> <property>
> <name>
> javax.jdo.option.ConnectionURL
> </name>
> <value>
> jdbc:mysql://hostname/hive
> </value>
> </property>
> {code}
> The initialization fails with an error
> {code}
> java.sql.SQLException: No suitable driver found for
> jdbc:mysql://hostname/hive
> at java.sql.DriverManager.getConnection(DriverManager.java:689)
> at java.sql.DriverManager.getConnection(DriverManager.java:208)
> at
> com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
> at com.jolbox.bonecp.BoneCP.obtainInternalConnection(BoneCP.java:269)
> at
> com.jolbox.bonecp.ConnectionHandle.<init>(ConnectionHandle.java:242)
> at
> com.jolbox.bonecp.PoolWatchThread.fillConnections(PoolWatchThread.java:115)
> at com.jolbox.bonecp.PoolWatchThread.run(PoolWatchThread.java:85)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)