hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tgh" <guanhua.t...@ia.ac.cn>
Subject 答复: code for hbase 0.90 ries ERROR in hbase 0.94
Date Thu, 20 Dec 2012 10:54:31 GMT
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


-----邮件原件-----
发件人: user-return-32649-guanhua.tian=ia.ac.cn@hbase.apache.org [mailto:user-return-32649-guanhua.tian=ia.ac.cn@hbase.apache.org]
代表 Lichao (andylee)
发送时间: 2012年12月20日 18:40
收件人: user@hbase.apache.org
主题: 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:guanhua.tian@ia.ac.cn]
发送时间: 2012年12月20日 18:17
收件人: user@hbase.apache.org
主题: 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

 





Mime
View raw message