You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by John Therrell <jt...@gmail.com> on 2011/04/01 00:58:25 UTC
Need help with unexpected ClassNotFoundException when using GNU Trove
library in custom jar MapReduce job
Hi everyone,
I'm experiencing a chain of runtime exceptions which I believe starts with a
ClassNotFoundException for a Trove library class I'm using in my custom
jar. Here's a copy of the error output: http://pastie.org/1741485.
I created a test java application that used the same Trove library and class
and did not experience the same exceptions. In NetBeans I can dig down into
the .jar file for the Trove library and see that the class I'm importing is
indeed there, so the runtime exceptions are a complete mystery to me.
Can anyone help or at least confirm that the issue that's causing my job to
fail is due to the ClassNotFoundException?
Thanks in advance,
John
Re: Need help with unexpected ClassNotFoundException when using GNU
Trove library in custom jar MapReduce job
Posted by Harsh J <ha...@cloudera.com>.
Hello John,
On Fri, Apr 1, 2011 at 5:11 AM, John Therrell <jt...@gmail.com> wrote:
> Just found the answer. I didn't realize that I needed to do either of two
> options:
Glad you found the solution! The first approach is the best one to
use, and is recommended.
> 1. If using the GenericOptionsParser, pass a -libjars <list of jars>
> argument.
--
Harsh J
Re: Need help with unexpected ClassNotFoundException when using GNU
Trove library in custom jar MapReduce job
Posted by John Therrell <jt...@gmail.com>.
Just found the answer. I didn't realize that I needed to do either of two
options:
1. If using the GenericOptionsParser, pass a -libjars <list of jars>
argument.
2. Merge all dependent jar libraries and main jar into one jar following
suggestions in
http://stackoverflow.com/questions/81260/java-easiest-way-to-merge-a-release-into-one-jar-file
.
On Thu, Mar 31, 2011 at 3:58 PM, John Therrell <jt...@gmail.com> wrote:
> Hi everyone,
>
> I'm experiencing a chain of runtime exceptions which I believe starts with
> a ClassNotFoundException for a Trove library class I'm using in my custom
> jar. Here's a copy of the error output: http://pastie.org/1741485.
>
> I created a test java application that used the same Trove library and
> class and did not experience the same exceptions. In NetBeans I can dig down
> into the .jar file for the Trove library and see that the class I'm
> importing is indeed there, so the runtime exceptions are a complete mystery
> to me.
>
> Can anyone help or at least confirm that the issue that's causing my job to
> fail is due to the ClassNotFoundException?
>
> Thanks in advance,
> John
>
>
>
>
>