hiveexception java.lang.runtimeexception:运行时异常:

8yoxcaq7  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(240)

当我试图显示数据库时,出现了这个异常。

vallabh@vallabh:~$ hive

hive> show databases;

失败:hiveexception java.lang.runtimeexception:无法示例化org.apache.hadoop.hive.ql.metadata.sessionhivemetastoreclient
下面是我的.bashrc文件


# Set HIVE_HOME

export HIVE_HOME=/opt/apache-hive-3.0.0-bin
export HIVE_CONF_DIR=/opt/apache-hive-3.0.0-bin/conf/
export PATH=$PATH:$HIVE_HOME/bin
export CLASSPATH=$CLASSPATH:/opt/hadoop-3.0.1/lib/*:.
export CLASSPATH=$CLASSPATH:/opt/apache-hive-3.0.0-bin/lib/*:

下面是我的hive-env.sh文件


# Set HADOOP_HOME to point to a specific hadoop install directory

export HADOOP_HOME=/opt/hadoop-3.0.1

# Hive Configuration Directory can be controlled by:

export HIVE_CONF_DIR=/opt/apache-hive-3.0.0-bin/conf

下面是我的hive-config.sh文件

export HADOOP_HOME=/opt/hadoop-3.0.1

以下是my hive-site.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="confguration.xsl"?><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contri utor license agreements. See the NOTICE fle distri uted with
this work for additional information regarding copyright ownership.
The ASF licenses this fle to You under the Apache License, Version 2.0
(the "License"); you may not use this fle except in compliance with
the License. You may o tain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required y applica le law or agreed to in writing, software-->

<confguration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jd c:mysql://localhost/metastore?createDatabaseIfNotExist=true</value>
<description>
JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide data ase-specifc SSL fag in
the connection URL.
For example, jd c:postgresql://myhost/d ?ssl=true for postgres database.
</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>

<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>Username to use against metastore database</description>
</property>

<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password@123</value>
<description>password to use against metastore database</description>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.fxedDatastore</name>

<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
</confguration>

错误的可能原因是什么。?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题