You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Anand Mundada <an...@ymail.com> on 2014/02/26 06:22:33 UTC
YARN - Running Client with third party jars
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
Re: YARN - Running Client with third party jars
Posted by Zhijie Shen <zs...@hortonworks.com>.
Have you include you json jar in HADOOP_CLASSPATH?
- Zhijie
On Tue, Feb 25, 2014 at 9:22 PM, Anand Mundada <an...@ymail.com>wrote:
> 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
>
>
--
Zhijie Shen
Hortonworks Inc.
http://hortonworks.com/
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: YARN - Running Client with third party jars
Posted by Fengyun RAO <ra...@gmail.com>.
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
>
>
Re: YARN - Running Client with third party jars
Posted by Fengyun RAO <ra...@gmail.com>.
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
>
>
Re: YARN - Running Client with third party jars
Posted by Zhijie Shen <zs...@hortonworks.com>.
Have you include you json jar in HADOOP_CLASSPATH?
- Zhijie
On Tue, Feb 25, 2014 at 9:22 PM, Anand Mundada <an...@ymail.com>wrote:
> 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
>
>
--
Zhijie Shen
Hortonworks Inc.
http://hortonworks.com/
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: YARN - Running Client with third party jars
Posted by Zhijie Shen <zs...@hortonworks.com>.
Have you include you json jar in HADOOP_CLASSPATH?
- Zhijie
On Tue, Feb 25, 2014 at 9:22 PM, Anand Mundada <an...@ymail.com>wrote:
> 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
>
>
--
Zhijie Shen
Hortonworks Inc.
http://hortonworks.com/
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: YARN - Running Client with third party jars
Posted by Zhijie Shen <zs...@hortonworks.com>.
Have you include you json jar in HADOOP_CLASSPATH?
- Zhijie
On Tue, Feb 25, 2014 at 9:22 PM, Anand Mundada <an...@ymail.com>wrote:
> 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
>
>
--
Zhijie Shen
Hortonworks Inc.
http://hortonworks.com/
--
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.
Re: YARN - Running Client with third party jars
Posted by Fengyun RAO <ra...@gmail.com>.
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
>
>
Re: YARN - Running Client with third party jars
Posted by Fengyun RAO <ra...@gmail.com>.
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
>
>