You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by fateme Abiri <fa...@yahoo.com> on 2013/11/04 17:32:58 UTC

java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

hi all
i'm running a mapreduce job in my hbase project.
my hadoop & hbase are remote and i run my code by this command in my terminal:
$ java  -cp  myproject.jar:/user/HadoopAndHBaseLibrary/*  mainproject

but i get this error:
attempt_201207261322_0002_m_000000_0, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

my other project which dont use import org.apache.hadoop.hbase.util.Bytes
has been successfully run!!! 
but when i
 use this class in my mapreduce Job  i got this error...

what could i do? can any one help me?
my hbase  version is : 0.94.11 and the jar files of it and Hadoop are completly in HadoopAndHBaseLibrary

--tanx 

Re: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

Posted by Stack <st...@duboce.net>.
On Mon, Nov 4, 2013 at 8:22 PM, fateme Abiri <fa...@yahoo.com> wrote:

> hi Dhaval
> thanks for replying...
> my other project which dont use this class has been run successfuly!!!
> can you say me how can i submit the jars for hbase and hadoop with my job
> submission ?? can you give me an exapmle, tanx very much Dhaval,
>
>
>
See
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/mapreduce/package-summary.html#package_description

There are also posts like the following that could help:
http://blog.cloudera.com/blog/2011/01/how-to-include-third-party-libraries-in-your-map-reduce-job/

St.Ack

Re: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

Posted by fateme Abiri <fa...@yahoo.com>.
hi Dhaval
thanks for replying...
my other project which dont use this class has been run successfuly!!! 
can you say me how can i submit the jars for hbase and hadoop with my job submission ?? can you give me an exapmle, tanx very much Dhaval,





On Monday, November 4, 2013 8:18 PM, Dhaval Shah <pr...@yahoo.co.in> wrote:
 
You need to add the Hadoop and HBase libraries to the Hadoop Classpath. You successfully added it on the classpath of your mainproject but when it submits the job to Hadoop, the classpath is lost. The easiest way is to modify hadoop_env.sh. Another way would be to submit the jars for hbase and hadoop with your job submission
 
Regards,
Dhaval


________________________________

From: fateme Abiri <fa...@yahoo.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org> 
Sent: Monday, 4 November 2013 11:32 AM
Subject: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes


hi all
i'm running a mapreduce job in my hbase project.
my hadoop & hbase are remote and i run my code by this command in my terminal:
$ java  -cp  myproject.jar:/user/HadoopAndHBaseLibrary/*  mainproject

but i get this error:
attempt_201207261322_0002_m_000000_0, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

my other project which dont use import org.apache.hadoop.hbase.util.Bytes
has been successfully run!!! 
but when i
use this class in my mapreduce Job  i got this error...

what could i do? can any one help me?
my hbase  version is : 0.94.11 and the jar files of it and Hadoop are completly in HadoopAndHBaseLibrary

--tanx

Re: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

Posted by Dhaval Shah <pr...@yahoo.co.in>.
You need to add the Hadoop and HBase libraries to the Hadoop Classpath. You successfully added it on the classpath of your mainproject but when it submits the job to Hadoop, the classpath is lost. The easiest way is to modify hadoop_env.sh. Another way would be to submit the jars for hbase and hadoop with your job submission
 
Regards,
Dhaval


________________________________
 From: fateme Abiri <fa...@yahoo.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org> 
Sent: Monday, 4 November 2013 11:32 AM
Subject: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes
 

hi all
i'm running a mapreduce job in my hbase project.
my hadoop & hbase are remote and i run my code by this command in my terminal:
$ java  -cp  myproject.jar:/user/HadoopAndHBaseLibrary/*  mainproject

but i get this error:
attempt_201207261322_0002_m_000000_0, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.util.Bytes

my other project which dont use import org.apache.hadoop.hbase.util.Bytes
has been successfully run!!! 
but when i
use this class in my mapreduce Job  i got this error...

what could i do? can any one help me?
my hbase  version is : 0.94.11 and the jar files of it and Hadoop are completly in HadoopAndHBaseLibrary

--tanx