hbase 0.90.5
hadoop 1.2.1
配置HBase,到了最後一步,jps下,發現主節點上HMaster沒有啟動,在HBase log裡有下面異常:
。。。
FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
java.lang.NoClassDefFoundError: org/apache/commons/configuration/Configuration
。。。
Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.Configuration
在網上,有老外如此回答:
Yep, commons-configuration-1.6.jar is shipped in recent hadoop-0.20.203
and not in previous hadoop-0.20.2.
Vamshi, I bet on hadoop throwing a remote exception, with hbase being
unable to read it cause it does not have the commons-configuration jar
(that's what can happen when remote throws exception with non-jdk classes).
Adding the jar in hbase will allow you to better read the cause, but you
will need after to fix your hadoop config.
意思是HBase 的 lib檔案夾中缺少commons-configuration。
從hadoop_home/lib下面cp一個commons-configuration-1.6.jar到hbase_home/lib下, 然後就開心了。