[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hadoop-user
Subject:    Re: [Classpath Issue]NoClassFoundException occurs when depending on the 3rd jar
From:       Namikaze Minato <lloydsensei () gmail ! com>
Date:       2015-12-24 0:34:24
Message-ID: CACmJb3zXcG122XqOUV7GTo_M0KvXGAO-xoZE2tyB9N6KJvSTrw () mail ! gmail ! com
[Download RAW message or body]

You could try:
HADOOP_CLASSPATH=B.jar:C.jar:D.jar hadoop jar A.jar
(space, not semicolumn)

Regards,
LLoyd

On 22 December 2015 at 17:21, Frank Luo <jluo@merkleinc.com> wrote:

> Make sure you call job.setJarByClass with right parameters.
> http://stackoverflow.com/questions/3912267/hadoop-query-regarding-setjarbyclass-method-of-job-class
>
>
>
> Other than that, try to do 2 and 3 together just to test it out. There is
> no reason it doesn't work.
>
>
>
> *From:* Todd [mailto:bit1129@163.com]
> *Sent:* Tuesday, December 22, 2015 12:01 AM
> *To:* user@hadoop.apache.org
> *Subject:* [Classpath Issue]NoClassFoundException occurs when depending
> on the 3rd jar
>
>
>
> 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!!
>
> This email and any attachments transmitted with it are intended for use by
> the intended recipient(s) only. If you have received this email in error,
> please notify the sender immediately and then delete it. If you are not the
> intended recipient, you must not keep, use, disclose, copy or distribute
> this email without the author's prior permission. We take precautions to
> minimize the risk of transmitting software viruses, but we advise you to
> perform your own virus checks on any attachment to this message. We cannot
> accept liability for any loss or damage caused by software viruses. The
> information contained in this communication may be confidential and may be
> subject to the attorney-client privilege.
>

[Attachment #3 (text/html)]

<div dir="ltr"><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px">You \
could try:</span><div><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px">HADOOP_CLASSPATH=B.jar:C.jar:D.jar \
hadoop jar A.jar</span><br></div><div><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px">(space, \
not semicolumn)</span></div><div><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px"><br></span></div><div><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px">Regards,</span></div><div><span \
style="color:rgb(0,0,0);font-family:Arial;font-size:14px;line-height:23.8px">LLoyd</span></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On 22 December 2015 at 17:21, Frank \
Luo <span dir="ltr">&lt;<a href="mailto:jluo@merkleinc.com" \
target="_blank">jluo@merkleinc.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Make \
sure you call job.setJarByClass with right parameters. <a \
href="http://stackoverflow.com/questions/3912267/hadoop-query-regarding-setjarbyclass-method-of-job-class" \
target="_blank"> http://stackoverflow.com/questions/3912267/hadoop-query-regarding-setjarbyclass-method-of-job-class</a><u></u><u></u></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Other \
than that, try to do 2 and 3 together just to test it out. There is no reason it \
doesn't work. <u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Todd [mailto:<a \
href="mailto:bit1129@163.com" target="_blank">bit1129@163.com</a>] <br>
<b>Sent:</b> Tuesday, December 22, 2015 12:01 AM<br>
<b>To:</b> <a href="mailto:user@hadoop.apache.org" \
target="_blank">user@hadoop.apache.org</a><br> <b>Subject:</b> [Classpath \
Issue]NoClassFoundException occurs when depending on the 3rd \
jar<u></u><u></u></span></p><div><div class="h5"> <p class="MsoNormal"><u></u>  \
<u></u></p> <div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span \
style="font-size:10.5pt;font-family:&quot;Arial&quot;,sans-serif;color:black">Hi,<br> \
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&#39;s mapper and reducer through \
reflection.<br> I am using the following commands to submit the job,but B&#39;s \
mapper class not found exception is thrown.<br> 1. <br>
$HADOOP_CLASSPATH=B.jar:other jars<br>
hadoop jar A.jar<br>
<br>
2. HADOOP_CLASSPATH=B.jar:other jars;hadoop jar A.jar<br>
3. hadoop jar A.jar -libjars B.jar<br>
<br>
All the above three ways don&#39;t work. Can someone help me on this? \
Thanks!!<u></u><u></u></span></p> </div>
</div>
</div></div></div>
<p><span style="font-size:10px"><span \
style="font-family:arial,helvetica,sans-serif">This email and any attachments \
transmitted with it are intended for use by the intended recipient(s) only. If you \
have received this email in error, please notify the sender  immediately and then \
delete it. If you are not the intended recipient, you must not keep, use, disclose, \
copy or distribute this email without the author's prior permission. We take \
precautions to minimize the risk of transmitting software viruses, but we  advise you \
to perform your own virus checks on any attachment to this message. We cannot accept \
liability for any loss or damage caused by software viruses. The information \
contained in this communication may be confidential and may be subject to the \
attorney-client  privilege.</span></span></p>
</div>

</blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic