HBase:ERROR: tried to access method com.google.common.base.Stopwatch

hbase scan时报错:

hbase(main):007:0* scan 'lsy_test_thin_jar'
ROW                   COLUMN+CELL                                               

ERROR: tried to access method com.google.common.base.Stopwatch.()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator

解决办法:

首先确认,Stopwatch在google的guava包下,果断开始查guava,发现项目里有两个版本的guava,删除一个,保留与当前hbase版本匹配的另一个,运行成功。

注,guava17开始,constructors发生变化,如果确认当前项目只有一个guava包,需确认版本问题。
测试,hbase1.2.1:guava12-16,运行无误;guava17开始,同样出现标题异常

参考

HBASE: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.

你可能感兴趣的:(HBase:ERROR: tried to access method com.google.common.base.Stopwatch)