Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (19k points)

Getting the below error while running hadoop map reduce job.

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/kamran/mapreduce/WordCountDemo has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)

at java.net.URLClassLoader.access$100(URLClassLoader.java:73)

at java.net.URLClassLoader$1.run(URLClassLoader.java:368)

at java.net.URLClassLoader$1.run(URLClassLoader.java:362)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:361)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:348)

at org.apache.hadoop.util.RunJar.run(RunJar.java:214)

at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

1 Answer

0 votes
by (33.1k points)

Try removing the / before the input path location in the command that you are giving for the map-reduce code:

hadoop jar UnderstandingMapReduce.jar com.kamran.mapreduce.WordCountDemo WordCountDemo/Input/WordC

Hope this answer helps you!

Browse Categories

...