Support Questions
Find answers, ask questions, and share your expertise

while running import-hive.sh script getting below error

Explorer

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/core/util/FeaturesAndProperties
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.main(HiveMetaStoreBridge.java:134)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.core.util.FeaturesAndProperties
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 13 more
Failed to import Hive Meta Data!!!

 

 

Could you please help me with this.

Thanks in Advance.

Regards,

Venkataramana 

4 REPLIES 4

Super Collaborator

@t1 Looks like you are missing jersey related jars

Can you share the output of the below command

# ls -lrth /usr/hdp/current/atlas-server/hook/hive/atlas-hive-plugin-impl

Explorer

ls -lrth /mnt/apache-atlas-2.1.0/hook/hive/atlas-hive-plugin-impl/
total 14M
-rw-r--r-- 1 root root 53K Jun 18 06:45 jersey-multipart-1.19.jar
-rw-r--r-- 1 root root 162K Jun 18 06:45 jersey-json-1.19.jar
-rw-r--r-- 1 root root 318K Jun 18 06:45 jackson-core-2.9.9.jar
-rw-r--r-- 1 root root 66K Jun 18 06:45 jackson-annotations-2.9.9.jar
-rw-r--r-- 1 root root 355K Jun 18 06:45 commons-configuration-1.10.jar
-rw-r--r-- 1 root root 546K Jun 18 06:45 atlas-intg-2.1.0.jar
-rw-r--r-- 1 root root 79K Jun 18 06:45 atlas-common-2.1.0.jar
-rw-r--r-- 1 root root 23K Jun 18 06:45 atlas-client-v2-2.1.0.jar
-rw-r--r-- 1 root root 42K Jun 18 06:45 atlas-client-v1-2.1.0.jar
-rw-r--r-- 1 root root 37K Jun 18 06:45 atlas-client-common-2.1.0.jar
-rw-r--r-- 1 root root 7.0M Jun 18 06:45 kafka_2.11-2.0.0.jar
-rw-r--r-- 1 root root 45K Jun 18 06:45 jsr311-api-1.1.jar
-rw-r--r-- 1 root root 1.4M Jun 18 06:45 jackson-databind-2.10.0.jar
-rw-r--r-- 1 root root 94K Jun 18 06:45 hive-bridge-2.1.0.jar
-rw-r--r-- 1 root root 63K Jun 18 06:45 atlas-notification-2.1.0.jar
-rw-r--r-- 1 root root 1.9M Jun 18 06:45 kafka-clients-2.0.0.jar
-rw-rw-r-- 1 hadoop hadoop 427K Jun 21 11:14 jersey-core-1.19.jar
-rw-rw-r-- 1 hadoop hadoop 46K Jun 23 09:12 jsr311-api-1.1.1.jar
-rw-rw-r-- 1 hadoop hadoop 1.4M Jun 23 09:12 jersey-bundle-1.9.jar

Super Collaborator

@t1 Looks like you have installed in the custom path, In HDP Hive should be picking up Atlas hook from /usr/hdp/<version>/atlas/hook/hive

 

Can you check Hive server logs and see which path it is picking for atlas hook

Explorer

@Scharan  Below path i am using in hive-env.sh

 

export HIVE_AUX_JARS_PATH=/mnt/apache-atlas-2.1.0/hook/hive