You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Fengyun RAO <ra...@gmail.com> on 2014/03/01 08:11:45 UTC

Re: YARN - Running Client with third party jars

read this:
http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven


2014-02-26 13:22 GMT+08:00 Anand Mundada <an...@ymail.com>:

> Hi I want to use json jar in client code.
> I tried to create runnable jar which include all required jars.
> But I am getting following exception.
>
> java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
> at distributeddb.Client.readJSON(Client.java:250)
> at distributeddb.Client.getPartitionInfo(Client.java:284)
> at distributeddb.Client.main(Client.java:120)
> 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:606)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
> Caused by: java.lang.ClassNotFoundException:
> org.json.simple.parser.JSONParser
> 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:425)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> ... 8 more
>
> How to solve this issue ?
>
> Thanks,
> Anand
>
>