[英]java.lang.NoClassDefFoundError: org/apache/htrace/core/HTraceConfiguration
I am using hadoop 2.9.1 and hbase 2.1.0 at stand-alone local mode.我在独立本地模式下使用 hadoop 2.9.1 和 hbase 2.1.0。
When I tried staring HBase 2.1.0 using sudo start-hbase.sh
at bin folder, I got below error:当我尝试在 bin 文件夹中使用sudo start-hbase.sh
盯着 HBase 2.1.0 时,出现以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/htrace/core/HTraceConfiguration
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:153)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2983)
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.core.HTraceConfiguration
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
This is my hbase-site.xml
这是我的hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>/home/niyazmohamed/bigdata/upgraded_versions/hbase-2.1.0/hbasedir</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/niyazmohamed/bigdata/upgraded_versions/hbase-2.1.0/zookeeper</value>
</property>
</configuration>
When I tried to start HBase version 1.2.0 , it started successfully and hbase shell
was also accessible and CRUD operations were successful.当我尝试启动 HBase 版本 1.2.0 时,它成功启动并且hbase shell
也可以访问并且 CRUD 操作成功。
Hadoop and HBase path are set.设置了 Hadoop 和 HBase 路径。 Only by that , I was able to run HBase-1.2.0.只有这样,我才能运行 HBase-1.2.0。
Only with HBase-2.1.0, this problem occurs.只有 HBase-2.1.0 才会出现这个问题。
Any help appreciated!任何帮助表示赞赏! Thanks in advance!提前致谢!
Related: Starting HBASE, java.lang.ClassNotFoundException: org.apache.htrace.SamplerBuilder相关: 启动 HBASE,java.lang.ClassNotFoundException:org.apache.htrace.SamplerBuilder
htrace-core-*-incubating.jar
was missing from some early versions of HBase 2.x一些早期版本的 HBase 2.x 中缺少htrace-core-*-incubating.jar
If the htrace-core
jar
is in $HBASE_HOME/lib/client-facing-thirdparty
如果htrace-core
jar
在$HBASE_HOME/lib/client-facing-thirdparty
htrace-core
$HBASE_HOME/lib/client-facing-thirdparty
copy the jar
to $HBASE_HOME/lib
, otherwise将jar
复制到$HBASE_HOME/lib
,否则
Download the Jar from Maven here在此处从 Maven 下载 Jar
and place into $HBASE_HOME/lib
并放入$HBASE_HOME/lib
You can see in HBase pom.xml
for version hbase 2.1
that htrace 4.2.0
is the correct version of the dependency.您可以在hbase 2.1
版本的 HBase pom.xml
看到htrace 4.2.0
是正确版本的依赖项。https://github.com/apache/hbase/blob/rel/2.1.0/pom.xml#L1364https://github.com/apache/hbase/blob/rel/2.1.0/pom.xml#L1364
Goodluck.祝你好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.