hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Jeltema <bdjelt...@gmail.com>
Subject Re: [Classpath Issue]NoClassFoundException occurs when depending on the 3rd jar
Date Tue, 22 Dec 2015 10:52:15 GMT
try:
   
   export HADOOP_CLASSPATH=B.jar
   hadoop jar A.jar -libjars B.jar


> On Dec 22, 2015, at 1:01 AM, Todd <bit1129@163.com> wrote:
> 
> Hi,
> I have two jars, A and B. A contains the class that has the main method, B contains the
mapper and reducer. A will collect B's mapper and reducer through reflection.
> I am using the following commands to submit the job,but B's mapper class not found exception
is thrown.
> 1. 
> $HADOOP_CLASSPATH=B.jar:other jars
> hadoop jar A.jar
> 
> 2. HADOOP_CLASSPATH=B.jar:other jars;hadoop jar A.jar
> 3. hadoop jar A.jar -libjars B.jar
> 
> All the above three ways don't work. Can someone help me on this? Thanks!!
> 


Mime
View raw message