hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Haosong Huang <haosd...@gmail.com>
Subject Re: example of hbase definitive guide
Date Fri, 22 Nov 2013 11:56:45 GMT
Make sure you are add all dependent jars to classpath correctly. If you
still failed after execute the command above, post the error message to
this email please. :-)

On Fri, Nov 22, 2013 at 7:53 PM, Haosong Huang <haosdent@gmail.com> wrote:

> The error log looks like you don't add the hbase jar correctly. Try the
> commond below:
>
> java -cp hbase-trai.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.
> p0.22/lib/*:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/*
> client.PutWriteBufferExample
>
>
> On Fri, Nov 22, 2013 at 7:17 PM, Silvio Di gregorio <
> silvio.digregorio@gmail.com> wrote:
>
>> Hi to All
>> this is the first time, i have launched the example PutWriteBufferExample,
>> chapter 3 of the "hbase definitive guide" in a working hadoop cluster and
>> returns this error
>>
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.hadoop.hbase.HBaseConfiguration
>>
>> i have build the example in eclipse with all necessary jar, after the
>> command i have launched:
>>
>> *- java -cp hbase-trai.jar client.PutWriteBufferExample -classpath `hbase
>> classpath`*
>>  ERROR:
>>  Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/hadoop/hbase/HBaseConfiguration
>>         at
>> client.PutWriteBufferExample.main(PutWriteBufferExample.java:18)
>>
>> *- hadoop jar hbase-trai.jar client.PutWriteBufferExample -libjars `hbase
>> classpath`*
>> ERROR:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/hadoop/hbase/HBaseConfiguration
>>         at
>> client.PutWriteBufferExample.main(PutWriteBufferExample.java:18)
>>
>> hbase classpath work, a piace of output
>>
>>
>> /opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../conf:/opt/jdk1.7.0_21//lib/tools.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/..:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../hbase-0.94.6-cdh4.3.0-security.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../hbase-0.94.6-cdh4.3.0-security-tests.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../hbase.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/activation-1.1.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/aopalliance-1.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/asm-3.2.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/avro-1.7.4.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-beanutils-1.7.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-beanutils-core-1.8.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-cli-1.2.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-codec-1.4.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-collections-3.2.1.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-compress-1.4.1.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-configuration-1.6.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-daemon-1.0.3.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-digester-1.8.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-el-1.0.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-httpclient-3.1.jar:/opt/cloudera/parcels/CDH-4.3.0-1.cdh4.3.0.p0.22/lib/hbase/bin/../lib/commons-io-2.1.jar:/opt/cloude
>> ........
>>
>> Can you help me? i'm newbie.
>> thanks in advance
>> Silvio
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>



-- 
Best Regards,
Haosdent Huang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message