Trying to run Hadoop Map Reduce example in Cloudera


Whenever I follow step 12 to submit the job to the cluster I get an error saying in the Running Map Reduce file on the google drive I get an error that says


Exception in thread "main" java.lang.UnsupportedClassVersionError: com/eng/mr/WordCountDriver : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(
    at java.lang.ClassLoader.defineClass(
    at Method)
    at java.lang.ClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at org.apache.hadoop.util.RunJar.main(

3 Answer(s)


I'm trying to run this in the VM Ware machine.


Hi Blaine,

You are getting following error: Unsupported major.minor version 51.0.

The reason is you have compiled the mapreduce jar in different version while creating and running in different version.

For example: You have created the jar with java-8 and trying to run in java-7 environment.

Hope this helps.


Ok I understand the problem but how do I fix this?  From my understanding I need to create the jar and run the jar using the same java version. I'm not aware of how to do this. Do I need to use the Java Version the the Cloudera VM uses?


Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)