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)
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With