错误:
使用jar中的配置初始化日志:file:/usr/local/hive/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async:true 线程" main"中的例外情况java.lang.RuntimeException:org.apache.hadoop.hive.ql.metadata.HiveException:java.lang.RuntimeException:无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 在org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:578) 在org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518) 在org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705) 在org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 在org.apache.hadoop.util.RunJar.run(RunJar.java:221) 在org.apache.hadoop.util.RunJar.main(RunJar.java:136) 引起:org.apache.hadoop.hive.ql.metadata.HiveException:java.lang.RuntimeException:无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 在org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226) 在org.apache.hadoop.hive.ql.metadata.Hive。(Hive.java:366) 在org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310) 在org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290) 在org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266) 在org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545) ......还有9个 引起:java.lang.RuntimeException:无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 在org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1627) 在org.apache.hadoop.hive.metastore.RetryingMetaStoreClient。(RetryingMetaStoreClient.java:80) 在org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130) 在org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101) 在org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3317) 在org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3356) 在org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336) 在org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590) 在org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236) 在org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221) ......还有14个 引起:java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 在org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1625) ......还有23个 引起:javax.jdo.JDOFatalInternalException:创建事务连接工厂时出错 NestedThrowables: java.lang.reflect.InvocationTargetException at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:671) 在org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:834) 在org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:338) 在org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 在javax.jdo.JDOHelper $ 16.run(JDOHelper.java:1965) at java.security.AccessController.doPrivileged(Native Method) 在javax.jdo.JDOHelper.invoke(JDOHelper.java:1960) 在javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166) 在javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808) 在javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701) 在org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:424) 在org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:453) 在org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:327) at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:294) 在org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76) 在org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136) 在org.apache.hadoop.hive.metastore.RawStoreProxy。(RawStoreProxy.java:58) 在org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67) 在org.apache.hadoop.hive.metastore.HiveMetaStore $ HMSHandler.newRawStore(HiveMetaStore.java:581) 在org.apache.hadoop.hive.metastore.HiveMetaStore $ HMSHandler.getMS(HiveMetaStore.java:546) 在org.apache.hadoop.hive.metastore.HiveMetaStore $ HMSHandler.createDefaultDB(HiveMetaStore.java:612) 在org.apache.hadoop.hive.metastore.HiveMetaStore $ HMSHandler.init(HiveMetaStore.java:398) 在org.apache.hadoop.hive.metastore.RetryingHMSHandler。(RetryingHMSHandler.java:78) 在org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:84) 在org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6396) 在org.apache.hadoop.hive.metastore.HiveMetaStoreClient。(HiveMetaStoreClient.java:236) 在org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient。(SessionHiveMetaStoreClient.java:70) ......还有28个 引起:java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606) at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:330) at org.datanucleus.store.AbstractStoreManager.registerConnectionFactory(AbstractStoreManager.java:203) 在org.datanucleus.store.AbstractStoreManager。(AbstractStoreManager.java:162) 在org.datanucleus.store.rdbms.RDBMSStoreManager。(RDBMSStoreManager.java:284) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:606) at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301) at org.datanucleus.NucleusContextHelper.createStoreManagerForProperties(NucleusContextHelper.java:133) at org.datanucleus.PersistenceNucleusContextImpl.initialise(PersistenceNucleusContextImpl.java:420) 在org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:821) ......还有57个 引起:java.lang.UnsupportedClassVersionError:com / mysql / jdbc / Driver:不支持的major.minor版本52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) 在java.net.URLClassLoader.access $ 100(URLClassLoader.java:71) 在java.net.URLClassLoader $ 1.run(URLClassLoader.java:361) 在java.net.URLClassLoader $ 1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) 在java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:412) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.forName0(Native Method) 在java.lang.Class.forName(Class.java:270) at org.datanucleus.ClassLoaderResolverImpl.classOrNull(ClassLoaderResolverImpl.java:510) at org.datanucleus.ClassLoaderResolverImpl.classForName(ClassLoaderResolverImpl.java:193) at org.datanucleus.ClassLoaderResolverImpl.classForName(ClassLoaderResolverImpl.java:372) at org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver(AbstractConnectionPoolFactory.java:47) 在org.datanucleus.store.rdbms.connectionpool.BoneCPConnectionPoolFactory.createConnectionPool(BoneCPConnectionPoolFactory.java:54) at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.java:213) at org.datanucleus.store.rdbms.ConnectionFactoryImpl.initialiseDataSources(ConnectionFactoryImpl.java:117) 在org.datanucleus.store.rdbms.ConnectionFactoryImpl。(ConnectionFactoryImpl.java:82) ......还有75个
蜂房-site.xml中
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastore?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
</configuration>
答案 0 :(得分:1)
引起:java.lang.UnsupportedClassVersionError:com / mysql / jdbc / Driver
在 hive-client / lib 中更改 mysql-connector-java-5.1.17.jar 版本,然后重试