Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hadoop wordcount Unsuppored Major.Minor version 51.0 ERROR

I created a jar file for wordcount in Hadoop 1.1.1 while running world count its giving me following error:

hduseros@MT2012018:/usr/local/hadoop$ bin/hadoop jar playground/wordcount.jar org.apache.hadoop.examples.WordCount /user/input/playground /user/output1
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/examples/WordCount : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
like image 893
Ananda Avatar asked Feb 18 '23 16:02

Ananda


1 Answers

This error comes when your hadoop system is running lower Java version than the one used to compile your MapReduce code.

Check java versions of your hadoop system and system you used to compile your code with "java -version".

like image 187
VenuJ Avatar answered Feb 24 '23 14:02

VenuJ