New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't be used in hive-0.11: java.lang.NoClassDefFoundError #77
Comments
Looks like you missing dependencies on your classpath. Try adding:
|
Thanks a lot. I add the dependencies on my classpath following http://mvnrepository.com/artifact/com.jayway.jsonpath/json-path/2.0.0 ( A new error happened where querying on hive: Appreciate your help. |
Sorry, you also need |
Thansk. But the same error occurred again. ..... |
If you have the following jars on your classpath you're problem lies elsewhere. |
Finally OK. Using: Thank you very much. |
Why aren't these dependencies included? |
They are if you use maven or gradle. Sent from my iPhone
|
I'm using maven. Had to explicitly define them. |
I just tested this again and it works. Does the attached project build? |
@zkendall could you please verify if attached project builds. |
That worked fine. |
More details about my situation. I have a dependency on RestAssured.
Which has a dependency on JsonPath. My IDE seemed to think everything was cool. But in run-time, I got NoClassDefFoundError. To solve this, I had to add json-path and json-path-assert and json-smart (net.minidev) dependencies. |
I removed json-path version 0.9.1 and replaced it with json-path version 2.0.0 and this seemed to work for me. |
I was caught in the same problem when writing a UDTF parsing json. My solution was to put the jar package in path:$HIVE_HOME/lib. |
The pom.xml was set according to your DOC: Getting Started.
I run it in my laptop, it works well. However, when run it on hive 0.11, error occurred:
Caused by: java.lang.NoClassDefFoundError: net/minidev/json/writer/JsonReaderI
at com.jayway.jsonpath.internal.DefaultsImpl.(DefaultsImpl.java:17)
at com.jayway.jsonpath.internal.DefaultsImpl.(DefaultsImpl.java:15)
at com.jayway.jsonpath.Configuration.getEffectiveDefaults(Configuration.java:53)
at com.jayway.jsonpath.Configuration.defaultConfiguration(Configuration.java:178)
at com.jayway.jsonpath.internal.JsonReader.(JsonReader.java:48)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:461)
at com.qunar.hive.udf.ParseJsonWithPath.evaluate(ParseJsonWithPath.java:64)
... 26 more
Caused by: java.lang.ClassNotFoundException: net.minidev.json.writer.JsonReaderI
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 33 more
Could anybody help me? Thanks a lot.
The text was updated successfully, but these errors were encountered: