Make sure you have htrace-nnn.jar in class path . You can find the jar under 
lib. nnn is the version number of the htrace jar

Demai on the run

On Jun 10, 2014, at 12:33 AM, Nguyen Phi Hung <[email protected]> wrote:

> Hi everyone,
> 
> Our hbase version 0.98.0-hadoop2. We are coding any service client using Java 
> native API and we received errors:
> 
> 09/06/2014 16:29:07 ERROR [pool-1-thread-1] HBaseModel: Fail to create hbase 
> connection
> java.io.IOException: java.lang.reflect.InvocationTargetException
>        at 
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:416)
>        at 
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:309)
>        at com.tamtay.fancipan.models.HBaseModel.<clinit>(HBaseModel.java:53)
>        at 
> com.tamtay.fancipan.hbase.LogActivityHandler.fanci(LogActivityHandler.java:29)
>        at 
> com.tamtay.fancipan.hbase.LogActivityThrift$Processor$fanci.getResult(LogActivityThrift.java:307)
>        at 
> com.tamtay.fancipan.hbase.LogActivityThrift$Processor$fanci.getResult(LogActivityThrift.java:292)
>        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>        at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:225)
>        at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>        at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>        at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>        at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>        at 
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:414)
>        ... 11 more
> Caused by: java.lang.NoClassDefFoundError: org/cloudera/htrace/Trace
>        at 
> org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:195)
>        at 
> org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:479)
>        at 
> org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
>        at 
> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:83)
>        at 
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.retrieveClusterId(HConnectionManager.java:857)
>        at 
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:662)
>        ... 16 more
> Caused by: java.lang.ClassNotFoundException: org.cloudera.htrace.Trace
>        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:425)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>        ... 22 more
> 
> 
> At begin, we used default hbase library for Java native client and while 
> running we getting java.lang.NoSuchFieldError: IBM_JAVA while running service 
> from Java.
> In these line errors, i found a bug is hahoop-common-2.2.0 library does’t 
> have PlatformName class. Otherwise, we checked in maven and we see in 
> hadoop-common-2.1.0 beta have PlatformName class and we replace default 
> library by older library(hadoop-common-2.1.0) and we received above 
> errors(red line)
> 
> Does anyone have ideas how to resolve it!
> 
> Many thanks

Reply via email to