title: Handling Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
body: <p>I am using CDH4 and have written a MapReduce application using the new mapreduce API. I have compiled it against hadoop-core-1.0.3.jar and when I run it on my Hadoop cluster I get the error:</p>
  
  <p>Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected</p>
  
  <p>I referred to <a href="https://stackoverflow.com/questions/14215771/couchbase-hadoop-connector-sqoop-job-failed-found-interface-org-apache-hadoop">this StackOverflow question</a> which seems to be talking about the same problem. The answer suggests that we compile out code against the Hadoop-core-2.X.jar file, but I am unable to find anything like that.</p>
  
  <p>So how do I compile it so that it runs flawlessly in CDH4.</p>