Missing package error when developing HBase program with eclipse

Source: Internet
Author: User
Tags log4j

Configure HBase on the win eclipse, and then write a simple action to create the table, using Ant's Build.xml to run the error:


[Sshexec] Connecting to 192.168.60.111:22

[Sshexec] cmd:/opt/hadoop/bin/hadoop jar/home/hadoop_jar/hbaseapp1.jar hbasetest. HbaseApp1

[Sshexec] Exception in thread "main"

[Sshexec] Java.lang.noclassdeffounderror:org/apache/hadoop/hbase/hbaseconfiguration

[Sshexec]

[Sshexec] at Hbasetest. Hbaseapp1.main (Unknown Source)

[Sshexec]

[Sshexec] at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

[Sshexec]

[Sshexec] at Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:57)




However, when you do not use build, right-click to run without error:


Log4j:warn No Appenders could is found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).

Log4j:warn Initialize the log4j system properly.

Log4j:warn See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Table exists



Workaround:

Add the following code in the hadoop-env.sh file

Export hadoop_classpath=/usr/local/hbase-0.98.8-hadoop2/lib/*


This article is from the "Leap Bird" blog, please be sure to keep this source http://jxplpp.blog.51cto.com/4455043/1652976

Missing package errors when developing hbase programs with Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.