Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unsupported major.minor version 51.0 in Sqoop2 in CDH 4.7.1 jar

Unsupported major.minor version 51.0 in Sqoop2 in CDH 4.7.1 jar

Explorer

I am getting the error "Unsupported major.minor version 51.0" while using Sqoop2 in CDH 4.7.1 jar on Java 1.8.0_111.

 

The following is the screen shot of the error:

 

/home/sxd24/tmp@sxd24-desktop> sqoop client
Warning: /home/sxd24/work/1/opt/cloudera/parcels/CDH-5.7.5-1.cdh5.7.5.p0.3/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/sqoop/Sqoop : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.sqoop.Sqoop.  Program will exit.
/home/sxd24/tmp@sxd24-desktop> java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
/home/sxd24/tmp@sxd24-desktop> hadoop version
Hadoop 2.0.0-cdh4.7.1
Subversion git://ubuntu64-12-04-mk1/var/lib/jenkins/workspace/generic-package-ubuntu64-12-04/CDH4.7.1-Packaging-Hadoop-2014-11-18_07-38-53/hadoop-2.0.0+1612-1.cdh4.7.1.p0.12~precise/src/hadoop-common-project/hadoop-common -r 8e266e052e423af592871e2dfe09d54c03f6a0e8
Compiled by jenkins on Tue Nov 18 08:11:19 PST 2014
From source with checksum efbc3ec8dbd142fa33469ff22e2ef51d
This command was run using /usr/lib/hadoop/hadoop-common-2.0.0-cdh4.7.1.jar
2 REPLIES 2

Re: Unsupported major.minor version 51.0 in Sqoop2 in CDH 4.7.1 jar

Guru

Hi,

 

I believe that you are on CDH5.7.5, not CDH4.7.1, based on the sqoop output, can you please confirm?

 

The error "Unsupported major.minor version 51.0" usually means that the version of Java bytecode being processed is higher than the version of the running JVM, which is not supported. Version 51.0 is actually Java 7.

So can you please confirm what Java version you are using on your cluster? Please confirm on all nodes by running the following command on each node:

 

alternatives --config java

 

Check the supported version here:

https://www.cloudera.com/documentation/enterprise/5-7-x/topics/cdh_ig_req_supported_versions.html#co...

Re: Unsupported major.minor version 51.0 in Sqoop2 in CDH 4.7.1 jar

Guru

Sorry, should be 

 

alternatives --display java

 

not 

 

alternatives --config java