启动时的配置单元问题

wecizke3  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(392)

错误:
使用中的配置初始化日志记录jar:file:/usr/local/hive/lib/hive-common-2.1.0.jar/hive-log4j2.properties async:线程“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.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)位于sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl。java:57)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。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.RegisteralFunctionsOnce(hive)。java:226)在org.apache.hadoop.hive.ql.metadata.hive。java:366)在org.apache.hadoop.hive.ql.metadata.hive.create(配置单元。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(配置单元)。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.RegisteralFunctionsOnce(hive。java:221) ... 14其他原因:sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)的java.lang.reflect.invocationtargetexception at sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)at sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl)。java:57)在sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl。java:45)在java.lang.reflect.constructor.newinstance(构造函数。java:526)位于org.apache.hadoop.hive.metastore.metastoreutils.newinstance(metastoreutils。java:1625) ... 23更多的原因是:javax.jdo.jdofatalinternalexception:创建事务连接工厂nestedthrowables时出错:java.lang.reflect.invocationtargetexception位于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)在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)在sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:57)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:606)在javax.jdo.jdohelper$16.run(jdohelper。java:1965)位于javax.jdo.jdohelper.invoke(jdohelper)的java.security.accesscontroller.doprivileged(本机方法)。java:1960)在javax.jdo.jdohelper.InvokeGetPersistenceManager工厂实现(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)在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。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更多原因:sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)处的java.lang.reflect.invocationtargetexception at sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)at sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl)。java:57)在sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl。java:45)在java.lang.reflect.constructor.newinstance(构造函数。java:526)位于org.datanucleus.plugin.nonmanagedpluginregistry.createexecutableextension(nonmanagedpluginregistry)。java:606)在org.datanucleus.plugin.pluginmanager.createexecutableextension(pluginmanager。java:330)在org.datanucleus.store.abstractstoremanager.registerconnectionfactory(abstractstoremanager。java:203)位于org.datanucleus.store.abstractstoremanager。java:162)在org.datanucleus.store.rdbms.rdbmsstoremanager.(rdbmsstoremanager。java:284)位于sun.reflect.nativeconstructoraccessorimpl.newinstance0(本机方法)sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl。java:57)在sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl。java:45)在java.lang.reflect.constructor.newinstance(constructor。java:526)在org.datanucleus.plugin.nonmanagedpluginregistry.createexecutableextension(nonmanagedpluginregistry)。java:606)在org.datanucleus.plugin.pluginmanager.createexecutableextension(pluginmanager。java:301)位于org.datanucleus.nucleuscontexthelper.createstoremanagerforproperties(nucleuscontexthelper。java:133)在org.datanucleus.persistencenucleuscontextimpl.initialise(persistencenucleuscontextimpl。java:420)在org.datanucleus.api.jdo.jdopersistencemanagerfactory.freezeconfiguration(jdopersistencemanagerfactory。java:821) ... 57更多原因:java.lang.unsupportedclassversionerror:com/mysql/jdbc/driver:unsupported major.minor version 52.0 at java.lang.classloader.defineclass1(本机方法)at java.lang.classloader.defineclass(classloader)。java:800)在java.security.secureclassloader.defineclass(secureclassloader。java:142)在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)位于java.security.accesscontroller.doprivileged(本机方法)java.net.urlclassloader.findclass(urlclassloader。java:354)在java.lang.classloader.loadclass(classloader。java:425)在sun.misc.launcher$appclassloader.loadclass(launcher。java:308)在java.lang.classloader.loadclass(classloader。java:412)在java.lang.classloader.loadclass(classloader。java:358)位于java.lang.class.forname0(本机方法)java.lang.class.forname(类。java:270)在org.datanucleus.classloaderresolverimpl.classornull(classloaderresolverimpl。java:510)在org.datanucleus.classloaderresolverimpl.classforname(classloaderresolverimpl。java:193)在org.datanucleus.classloaderresolverimpl.classforname(classloaderresolverimpl。java:372)在org.datanucleus.store.rdbms.connectionpool.abstractconnectionpoolfactory.loaddriver(abstractconnectionpoolfactory)。java:47)位于org.datanucleus.store.rdbms.connectionpool.bonecpconnectionpoolfactory.createconnectionpool(bonecpconnectionpoolfactory)。java:54)在org.datanucleus.store.rdbms.connectionfactoryimpl.generatedatasources(connectionfactoryimpl。java:213)位于org.datanucleus.store.rdbms.connectionfactoryimpl.initialisedatasources(connectionfactoryimpl。java:117)在org.datanucleus.store.rdbms.connectionfactoryimpl。java:82) ... 75个以上
配置单元站点.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>
ruarlubt

ruarlubt1#

原因:java.lang.unsupportedclassversionerror:com/mysql/jdbc/driver
在hive client/lib中,更改mysql-connector-java-5.1.17.jar版本,然后重试

相关问题