配置单元mysql连接器错误

8yparm6h  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(351)

我已经成功安装了hive和mysql,我按照link中的建议对hive进行了配置。但我看到一个错误如下:

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
..
..
Caused by: org.datanucleus.exceptions.NucleusException: Attempt to invoke the "BONECP" plugin to create a ConnectionPool gave an error : The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.

所以我在hive的lib中添加了mysql-connector-java.jar。现在Hive挂起来了,我一点也没拿到壳。
请建议我如何解决它

wlp8pajw

wlp8pajw1#

您需要将mysql连接器添加到配置单元中的类路径。它正在类路径中寻找连接器,但找不到。下载mysql连接器并将其放到以下路径

/usr/lib/hive/apache-hive-0.13.0-bin/lib

相关问题