-
Notifications
You must be signed in to change notification settings - Fork 2
NoClassDefFoundError: CommandNeedRetryException #1
Copy link
Copy link
Open
Description
Hello,
I'm using Hadeploy on HDP 3.1 cluster.
I have an error with hive database creation.
When I try to test jdchive with a simple template:
databases:
- name: test_database
tables: []
I have this error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/ql/CommandNeedRetryException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.ql.CommandNeedRetryException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
After some research, CommandNeedRetryException was removed in Hive 3 version:
JIRA: https://issues.apache.org/jira/browse/HIVE-17991
Here's what I did:
- Remove all CommandNeedRetryException references
- Update Main.java file:
-Driver driver = new Driver();
+Driver driver = new Driver(config);
- Update gradle.properties
-hiveVersion=1.2.1
+hiveVersion=3.1.2
Creating the Hive database works, but I'm not sure if it works with older Hive versions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels