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