异常Could not load xx.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly**

Posted lemon胡

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了异常Could not load xx.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly**相关的知识,希望对你有一定的参考价值。

报错Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly**

首先检查HiveConf类是否存在:
[hadoop@hadoop01 app]$ cd apache-hive-1.1.0-cdh5.7.0-bin/lib/
[hadoop@hadoop01 lib]$ jar tf hive-common-1.1.0-cdh5.7.0.jar | grep HiveConf.class
org/apache/hadoop/hive/conf/HiveConf.class

可以看到HiveConf.class是存在的,只是环境没有找到。

解决方法:
修改环境配置,将hive的lib添加到HADOOP_CLASSPATH中
[root@hadoop01 ~]# vi ~/.bash_profile
export HADOOP_CLASSPATH=/home/hadoop/app/hadoop-2.6.0-cdh5.7.0/lib/*
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HIVE_HOME/lib/*
source ~/.bash_profile

以上是关于异常Could not load xx.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly**的主要内容,如果未能解决你的问题,请参考以下文章

IO 异常:The Network Adapter could not establish the connection 怎么解决

Could not load file or assembly ‘CefSharp.Core.Runtime, Version=93.1.140.0

tomcat启动报错javax.naming.NamingException: Could not load resource factory class,spring启动失败

Could not initialize English chunker/Could not load file from classpath: ‘/en-token.bin‘

[Java EE]SpringBoot/Tomcat之启动时报"Error: Could not find or load main class CLASS xxxx""

could not load host key