Versioning Exception while executing MapReduce



0
I'm having this issue when trying to run MapReduce - I am compiling
the program in Eclipse using Java 8 and running Java 8 on the VM.

When running the program, it throws an "Unsupported major.minor version 52.0" exception. Any idea why this is happening?

Output:

cloudera@cloudera-vm:~/wordcount$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

cloudera@cloudera-vm:~/wordcount$ hadoop jar dezyrewordcount.jar
com.dezyre.DeZyreWordCount /wordcount/input/words.txt
/wordcount/output
15/11/22 06:22:34 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
15/11/22 06:22:34 INFO input.FileInputFormat: Total input paths to process : 1
15/11/22 06:22:35 INFO mapred.JobClient: Running job: job_201511220604_0002
15/11/22 06:22:36 INFO mapred.JobClient: map 0% reduce 0%
15/11/22 06:22:38 INFO mapred.JobClient: Task Id :
attempt_201511220604_0002_m_000000_0, Status : FAILED
Error: com/dezyre/DeZyreWordCount$MyMapper : Unsupported major.minor
version 52.0
15/11/22 06:22:39 INFO mapred.JobClient: Task Id :
attempt_201511220604_0002_m_000000_1, Status : FAILED
Error: com/dezyre/DeZyreWordCount$MyMapper : Unsupported major.minor version 52.0
15/11/22 06:22:40 INFO mapred.JobClient: Task Id :
attempt_201511220604_0002_m_000000_2, Status : FAILED
Error: com/dezyre/DeZyreWordCount$MyMapper : Unsupported major.minor version 52.0
15/11/22 06:22:42 INFO mapred.JobClient: Job complete: job_201511220604_0002
15/11/22 06:22:42 INFO mapred.JobClient: Counters: 7
15/11/22 06:22:42 INFO mapred.JobClient: Job Counters
15/11/22 06:22:42 INFO mapred.JobClient: Launched map tasks=4
15/11/22 06:22:42 INFO mapred.JobClient: SLOTS_MILLIS_REDUCES=0
15/11/22 06:22:42 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0
15/11/22 06:22:42 INFO mapred.JobClient: Failed map tasks=1
15/11/22 06:22:42 INFO mapred.JobClient: SLOTS_MILLIS_MAPS=2794
15/11/22 06:22:42 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0
15/11/22 06:22:42 INFO mapred.JobClient: Data-local map tasks=4

2 Answer(s)


0

Hi Ron,
The error is due to incompatible version of java compiler is used.
Please make sure the java version library you used in the eclipse is same as java version installed in Cloudera. For CDH3-Java 1.6 and CDH4-1.7.and CDH5-1.8
Hope this helps.
Thanks

0

hi Ron,

This is Java incompatibility, please follow steps provided http://stackoverflow.com/questions/22489398/unsupported-major-minor-version-52-0