I hope you are doing good.
You might be receiving this error as the mapreduce code of Counter is in Hadoop-2.X version and the jars you have added are hadoop-1.x version. Hence due to incompatibility of the versions it returning the above error.
To overcome this issue, please remove all the jars that were added to that project and add hadoop-mapreduce-client-core-2.2.0.jar & hadoop-common-2.2.0.jar to them. Please find these jars in the attachment.
After adding those jars to the project in eclipse, create a jar for the mapreduce program and try to run the mapreduce job.
I have tried it on my end and it is working fine. Please refer to the below screenshot.
Below is the input I have used.
Command: hadoop jar counter_new.jar /counterin.txt /counterout
Please find the jar and the project that I have used in the attachment for your reference.
Please try it and let me know if this helps you.
Waiting for your response.
Please feel free to revert if you need any further help.
Meanwhile if you feel satisfied with my response kindly leave your feedback by clicking on any one of the below smileys
Please note if you are not happy with the response on this ticket, please escalate it to firstname.lastname@example.org.
We assure you that we will get back to you within 24 hours