Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> code for hbase 0.90  ries ERROR in hbase 0.94


Copy link to this message
-
答复: code for hbase 0.90  ries ERROR in hbase 0.94
Thank you for your reply

---------------------code---------------------

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
org.apache.hadoop.conf.Configuration have been imported,

and where is ERROR, I am confused ,

or what about configuration about hbase0.94.3 , what is the difference between hbase0.94.3 and hbase0.90,
could you help me

thank you
------------------------
Tian Guanhua
-----邮件原件-----
发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 代表 Lichao (andylee)
发送时间: 2012年12月20日 18:40
收件人: [EMAIL PROTECTED]
主题: Re: code for hbase 0.90 ries ERROR in hbase 0.94

Hi guanhua:
  
  From the error , Your Code Configuration class shoule be import org.apache.hadoop.conf.Configuration ,not org.apache.commons.configuration.Configuration.
  Please check it.

-----邮件原件-----
发件人: tgh [mailto:[EMAIL PROTECTED]]
发送时间: 2012年12月20日 18:17
收件人: [EMAIL PROTECTED]
主题: code for hbase 0.90 ries ERROR in hbase 0.94

Hi
I used hbase0.90,and now turn to use hbase 0.94 , and my program is ERROR,

Could you help me

------------------- my code -----------------------
Configuration hbase_config = new Configuration();
hbase_config.set("hbase.zookeeper.quorum",
sms_zookper_service);
HTable table = null;

while (!m_bStop) {
if (table == null) {
try {
// log.info(String.format("Connect
To HBase %s", args));
table = new
HTable(HBaseConfiguration.create(hbase_config), sms_hbase_table);  //// there is the ERROR,
log.info("Connect To HBase
Completely");
} catch (Exception e1) {
e1.printStackTrace();
SetError();
}

-----------------------------log ERROR -------------- Exception in thread "Thread-1" java.lang.NoClassDefFoundError:
org/apache/commons/configuration/Configuration
        at
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<init>(DefaultMetricsSys
tem.java:37)
        at
org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.<clinit>(DefaultMetricsS
ystem.java:34)
        at
org.apache.hadoop.security.UgiInstrumentation.create(UgiInstrumentation.java
:51)
        at
org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformat
ion.java:216)
        at
org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupI
nformation.java:184)
        at
org.apache.hadoop.security.UserGroupInformation.isSecurityEnabled(UserGroupI
nformation.java:236)
        at
org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInform
ation.java:477)
        at
org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInfo
rmation.java:463)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.hbase.util.Methods.call(Methods.java:37)
        at org.apache.hadoop.hbase.security.User.call(User.java:586)
        at org.apache.hadoop.hbase.security.User.callStatic(User.java:576)
        at org.apache.hadoop.hbase.security.User.access$400(User.java:50)
        at
org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:393)
        at
org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:388)
        at org.apache.hadoop.hbase.security.User.getCurrent(User.java:139)
        at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.<init>(HCon
nectionManager.java:412)
        at
org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionM
anager.java:179)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:155)
        at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:133)
        at com.pattek.sms.opr.store.SmsStore.run(SmsStore.java:266)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.configuration.Configuration
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 25 more
Dec 20, 2012 6:09:01 PM com

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB