title: Error in pig while loading data
body: <p>I am using ubuntu 12.02 32bit and have installed <strong>hadoop2.2.0</strong> and <strong>pig 0.12</strong> successfully. Hadoop runs properly on my system.</p>
  
  <p>However, whenever I run this command :</p>
  
  <pre><code>data = load 'atoz.csv' using PigStorage(',')  as (aa1:int, bb1:int, cc1:int, dd1:chararray);            
  dump data;
  </code></pre>
  
  <p>I'm getting the following error :</p>
  
  <pre><code>ERROR org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl - Error whiletrying to run jobs.java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected.
  </code></pre>
  
  <p>Here is the full stacktrace :</p>
  
  <pre><code>&gt; 2014-01-23 10:41:44,998 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher- 1 map-reduce job(s) waiting for submission.
  &gt;             2014-01-23 10:41:45,000 [Thread-9] INFO  org.apache.hadoop.metrics.jvm.JvmMetrics - Cannot initialize JVM
  &gt; Metrics with processName=JobTracker, sessionId= - already initialized
  &gt;             2014-01-23 10:41:45,001 [Thread-9] ERROR org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl - Error while
  &gt; trying to run jobs.
  &gt;             java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.setupUdfEnvAndStores(PigOutputFormat.java:225)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.checkOutputSpecs(PigOutputFormat.java:186)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:456)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:342)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
  &gt;             at java.security.AccessController.doPrivileged(Native Method)
  &gt;             at javax.security.auth.Subject.doAs(Subject.java:415)
  &gt;             at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
  &gt;             at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.submit(ControlledJob.java:335)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl.run(JobControl.java:240)
  &gt;             at java.lang.Thread.run(Thread.java:724)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:260)
  &gt;             2014-01-23 10:41:45,498 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
  &gt; - 0% complete
  &gt;             2014-01-23 10:41:45,502 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
  &gt; - job null has failed! Stop running all dependent jobs
  &gt;             2014-01-23 10:41:45,503 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
  &gt; - 100% complete
  &gt;             2014-01-23 10:41:45,507 [main] ERROR org.apache.pig.tools.pigstats.SimplePigStats - ERROR 2997: Unable to
  &gt; recreate exception from backend error: Unexpected System Error
  &gt; Occured: java.lang.IncompatibleClassChangeError: Found interface
  &gt; org.apache.hadoop.mapreduce.JobContext, but class was expected
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.setupUdfEnvAndStores(PigOutputFormat.java:225)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.checkOutputSpecs(PigOutputFormat.java:186)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:456)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:342)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
  &gt;             at java.security.AccessController.doPrivileged(Native Method)
  &gt;             at javax.security.auth.Subject.doAs(Subject.java:415)
  &gt;             at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
  &gt;             at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.submit(ControlledJob.java:335)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl.run(JobControl.java:240)
  &gt;             at java.lang.Thread.run(Thread.java:724)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:260)
  2014-01-23 10:41:45,507 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s)
  &gt; failed!
  &gt;             2014-01-23 10:41:45,507 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats - Detected Local mode.
  &gt; Stats reported below may be incomplete
  &gt;             2014-01-23 10:41:45,508 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats - Script Statistics:
  HadoopVersion    PigVersion    UserId    StartedAt    FinishedAt    Features
  &gt;             2.2.0    0.10.1    hardik    2014-01-23 10:41:44    2014-01-23 10:41:45    UNKNOWN
   Failed!
  Failed Jobs:
  JobId    Alias    Feature    Message    Outputs
  N/A    aatoz    MAP_ONLY    Message: Unexpected System Error Occured: java.lang.IncompatibleClassChangeError: Found interface
  &gt; org.apache.hadoop.mapreduce.JobContext, but class was expected
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.setupUdfEnvAndStores(PigOutputFormat.java:225)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.checkOutputSpecs(PigOutputFormat.java:186)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:456)
  &gt;             at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:342)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
  &gt;             at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
  &gt;             at java.security.AccessController.doPrivileged(Native Method)
  &gt;             at javax.security.auth.Subject.doAs(Subject.java:415)
  &gt;             at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
  &gt;             at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.submit(ControlledJob.java:335)
  &gt;             at org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl.run(JobControl.java:240)
  &gt;             at java.lang.Thread.run(Thread.java:724)
  &gt;             at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:260)
  &gt;             file:/tmp/temp1979716161/tmp-189979005,
  Input(s):
  Failed to read data from "file:///home/hardik/pig10/bin/input/atoz.csv"
  Output(s):
               Failed to produce result in "file:/tmp/temp1979716161/tmp-189979005"
  Job DAG:
  null
  2014-01-23 10:41:45,509 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
   Failed! 2014-01-23 10:41:45,510 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator
  &gt; for alias aatoz
  &gt;             Details at logfile: /home/hardik/pig10/bin/pig_1390453192689.log
  &gt;     &lt;/i&gt;
  </code></pre>