hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kawa <kawa.a...@gmail.com>
Subject Re: Unable to use third party jar
Date Mon, 02 Dec 2013 22:11:14 GMT
Could you please try:

$ export HADOOP_CLASSPATH="$HADOOP_CLASSPATH:json-simple-1.1.1.jar"
$ hadoop jar domain_gold.jar org.select.Driver -libjars
json-simple-1.1.1.jar  $INPUT1 $INPUT2 $OUTPUT


2013/10/24 jamal sasha <jamalshasha@gmail.com>

> OOps..forgot the code:
> http://pastebin.com/7XnyVnkv
>
>
> On Thu, Oct 24, 2013 at 10:54 AM, jamal sasha <jamalshasha@gmail.com>wrote:
>
>> Hi,
>>
>> I am trying to join two datasets.. One of which is json..
>> I am relying on json-simple library to parse that json..
>> I am trying to use libjars.. So far .. for simple data processing.. the
>> approach has worked.. but now i am getting the following error
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/json/simple/parser/ParseException
>> at java.lang.Class.forName0(Native Method)
>>  at java.lang.Class.forName(Class.java:264)
>> at
>> org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:820)
>>  at
>> org.apache.hadoop.mapreduce.lib.input.MultipleInputs.getMapperTypeMap(MultipleInputs.java:141)
>> at
>> org.apache.hadoop.mapreduce.lib.input.DelegatingInputFormat.getSplits(DelegatingInputFormat.java:60)
>>  at
>> org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:1024)
>> at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:1041)
>>  at org.apache.hadoop.mapred.JobClient.access$700(JobClient.java:179)
>> at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:959)
>>  at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:912)
>> at java.security.AccessController.doPrivileged(Native Method)
>>  at javax.security.auth.Subject.doAs(Subject.java:415)
>> at
>> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1136)
>>  at
>> org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:912)
>> at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
>>  at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
>> at org.select.Driver.run(Driver.java:130)
>>  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>> at org.select.Driver.main(Driver.java:139)
>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>  at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:601)
>>  at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
>> Caused by: java.lang.ClassNotFoundException:
>> org.json.simple.parser.ParseException
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>>  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>> at java.security.AccessController.doPrivileged(Native Method)
>>  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>>
>> I think I have implemented toolrunner.
>>
>> hadoop jar domain_gold.jar org.select.Driver \
>> -libjars json-simple-1.1.1.jar  $INPUT1 $INPUT2 $OUTPUT
>> .
>>
>
>

Mime
View raw message