当前位置:   article > 正文

hive启动不成功_ubuntu hive caused by:org.datanucleus

ubuntu hive caused by:org.datanucleus

问题:


进入hive/bin启动hive出现如下错误

17/03/05 17:38:03 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
Logging initialized using configuration in jar:file:/home/zkpk/Software/apache-hive-0.13.1-bin/lib/hive-common-0.13.1.jar!/hive-log4j.properties
Exception in thread “main” java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
at
at org.apache.hadoop.util.RunJar.main(RunJar.
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.
… 7 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.
at
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.
… 12 more
Caused by: javax.jdo.JDOFatalInternalException: Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
at
at
at
at
at
at
at
at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.
at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.
at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.
at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.
at org.apache.hadoop.hive.metastore.RawStoreProxy.(RawStoreProxy.
at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.
at org.apache.hadoop.hive.metastore.HiveMetaStoreHMSHandler.newRawStore(HiveMetaStore.atorg.apache.hadoop.hive.metastore.HiveMetaStoreHMSHandler.getMS(HiveMetaStore.
at org.apache.hadoop.hive.metastore.HiveMetaStoreHMSHandler.createDefaultDB(HiveMetaStore.atorg.apache.hadoop.hive.metastore.HiveMetaStoreHMSHandler.init(HiveMetaStore.
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.(HiveMetaStore.
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.(RetryingHMSHandler.
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.
at org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.(HiveMetaStoreClient.
… 17 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.
at
at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.
at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.
at org.datanucleus.store.AbstractStoreManager.registerConnectionFactory(AbstractStoreManager.
at org.datanucleus.store.AbstractStoreManager.(AbstractStoreManager.
at org.datanucleus.store.rdbms.RDBMSStoreManager.(RDBMSStoreManager.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.
at
at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.
at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.
at org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.
at org.datanucleus.NucleusContext.initialise(NucleusContext.
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.
… 46 more
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.
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.initialiseDataSources(ConnectionFactoryImpl.
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.(ConnectionFactoryImpl.
… 64 more
Caused by: org.datanucleus.store.rdbms.connectionpool.DatastoreDriverNotFoundException: 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.
at org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver(AbstractConnectionPoolFactory.
at org.datanucleus.store.rdbms.connectionpool.BoneCPConnectionPoolFactory.createConnectionPool(BoneCPConnectionPoolFactory.
at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.
… 66 more

解决方法:


将mysql-connector-java-5.1.40-bin.jar复制到hive/lib下即可。我的节点版本是centos7,自带的是mariadb不是mysql,因此自己下载了mysql-connector-java-5.1.40-bin.jar放在了hive/lib下。
这里写图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/719417
推荐阅读
相关标签
  

闽ICP备14008679号