title: NoClassDefFoundError: org/apache/hadoop/hbase/TableNotFoundException
body: <p>I was going to import data from local file to Hbase by using 'hbase.mapreduce.Import'.
  I executed <code>hbase org.apache.hadoop.hbase.mapreduce.Import News file:///Hbackup/News/</code> <strong>on root</strong>.</p>
  <p>However, when I checked Hadoop container, I found an error happened. Here is the syslog of master node, which is same as another slave node:</p>
  <pre><code>2021-07-27 03:07:45,411 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Created MRAppMaster for application appattempt_1627349972787_0004_000001
  2021-07-27 03:07:45,782 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Executing with tokens:
  2021-07-27 03:07:45,782 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Kind: YARN_AM_RM_TOKEN, Service: , Ident: (appAttemptId { application_id { id: 4 cluster_timestamp: 1627349972787 } attemptId: 1 } keyId: -1057494481)
  2021-07-27 03:07:45,934 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Using mapred newApiCommitter.
  2021-07-27 03:07:46,605 INFO [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: OutputCommitter set in config null
  2021-07-27 03:07:46,661 FATAL [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster
  java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/TableNotFoundException
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2134)
      at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2099)
      at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193)
      at org.apache.hadoop.mapreduce.task.JobContextImpl.getOutputFormatClass(JobContextImpl.java:222)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1.call(MRAppMaster.java:474)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1.call(MRAppMaster.java:458)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.callWithJobClassLoader(MRAppMaster.java:1560)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.createOutputCommitter(MRAppMaster.java:458)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceInit(MRAppMaster.java:377)
      at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$4.run(MRAppMaster.java:1518)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1515)
      at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1448)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.TableNotFoundException
      at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      ... 18 more
  2021-07-27 03:07:46,665 INFO [main] org.apache.hadoop.util.ExitUtil: Exiting with status 1
  </code></pre>
  <p>Unfortunately, I have searched this error on Baidu and Bing, and I cannot found useful articles, here is the most relavant one I found:
  <a href="https://stackoverflow.com/questions/4864520/java-lang-noclassdeffounderror-org-apache-hadoop-hbase-masternotrunningexceptio">java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/MasterNotRunningException</a></p>
  <p>Then I checked my Hadoop classpath, and <strong>Hbase jars are already exist</strong>.</p>
  <pre><code>root@master:~# $HADOOP_HOME/bin/hadoop classpath
  /usr/tools/hadoop/etc/hadoop:/usr/tools/hadoop/share/hadoop/common/lib/*:/usr/tools/hadoop/share/hadoop/common/*:/usr/tools/hadoop/share/hadoop/hdfs:/usr/tools/hadoop/share/hadoop/hdfs/lib/*:/usr/tools/hadoop/share/hadoop/hdfs/*:/usr/tools/hadoop/share/hadoop/yarn/lib/*:/usr/tools/hadoop/share/hadoop/yarn/*:/usr/tools/hadoop/share/hadoop/mapreduce/lib/*:/usr/tools/hadoop/share/hadoop/mapreduce/*:/usr/tools/hbase-2.3.5/lib/*:/usr/tools/hadoop/contrib/capacity-scheduler/*.jar
  </code></pre>
  <p>In addition:</p>
  <ol>
  <li><p>Here are the versions:</p>
  <p>Jdk: 1.8.0.291
  Zookeeper: 3.4.12
  Hadoop: 2.7.1
  Hbase: 2.3.5</p>
  </li>
  <li><p>I found another java program can write Hbase, so I believe Hbase works.</p>
  </li>
  </ol>
  <p>Now I have no idea about this error, what should I do to solve this?
  Thanks for reading and answering.</p>