title: nosuchmethod error on hadoop java
body: <p>Here is my run method</p>
  
  <pre><code>Configuration conf = new Configuration();
  
      MongoConfigUtil.setOutputURI(conf, "mongodb://localhost/test/sensors");
  
      System.out.println("Conf : " + conf);
  
      conf.set("fs.defaultFS", "hdfs://localhost:9000");
      @SuppressWarnings("deprecation")
      Job job = new Job(conf, "sensor");
  
      job.setJarByClass(HdfsToMongo.class);
  
      job.setMapperClass(TokenzierMapper.class);
  
      job.setCombinerClass(IntSumReducer.class);
      job.setReducerClass(IntSumReducer.class);
  
      job.setOutputKeyClass(Text.class);
      job.setOutputValueClass(IntWritable.class);
  
      job.setInputFormatClass(TextInputFormat.class);
      job.setInputFormatClass(TextInputFormat.class);
  
      job.setOutputFormatClass(TextOutputFormat.class);
      FileInputFormat.setInputPaths(job, new Path("In"));
  
      job.setOutputFormatClass(MongoOutputFormat.class);
  
      return job.waitForCompletion(true) ? 0 : 1;
  </code></pre>
  
  <p>I have a hadoop job which connects mongodb and gets data to hdfs. When I run the code I get this exception</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.mapred.LocalJobRunner.&lt;init&gt;(Lorg/apache/hadoop/conf/Configuration;)V
  at org.apache.hadoop.mapred.LocalClientProtocolProvider.create(LocalClientProtocolProvider.java:42)
  at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:95)
  at org.apache.hadoop.mapreduce.Cluster.&lt;init&gt;(Cluster.java:82)
  at org.apache.hadoop.mapreduce.Cluster.&lt;init&gt;(Cluster.java:75)
  at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1266)
  at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1262)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.security.auth.Subject.doAs(Subject.java:415)
  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
  at org.apache.hadoop.mapreduce.Job.connect(Job.java:1261)
  at org.apache.hadoop.mapreduce.Job.submit(Job.java:1290)
  at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1314)
  at tr.com.vedat.hadoop.HdfsToMongo.run(HdfsToMongo.java:86)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
  at tr.com.vedat.hadoop.HdfsToMongo.main(HdfsToMongo.java:90)
  </code></pre>
  
  <p>in HdfsToMongo class, errors occures at <code>job.waitForCompletion(true) ? 0 : 1;</code> line.
  So, can anyone show me my faults? Did I forget something in the code?</p>