本地编写hbase程序后,maven生成jar包,提交到测试环境,使用MapReduce执行时,
$ yarn jar /home/dwuser/jars/hbase-1.0-SNAPSHOT.jar 类名 参数名....
遇到如下报错:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/client/Scan
at com.xxx.xxxxxxxx.run(xxxxxx.java:77)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at com.xxx.xxxxx.main(xxxxxx.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.ClassNotFoundExcept