title: Spark Streaming + kafka "JobGenerator" java.lang.NoSuchMethodError
body: <p>I'm new in spark streaming and kafka and I don't understand this runtime exception. I've already setup the kafka server.</p>
  
  <pre><code>    Exception in thread "JobGenerator" java.lang.NoSuchMethodError: org.apache.spark.streaming.scheduler.InputInfoTracker.reportInfo(Lorg/apache/spark/streaming/Time;Lorg/apache/spark/streaming/scheduler/StreamInputInfo;)V
  at org.apache.spark.streaming.kafka.DirectKafkaInputDStream.compute(DirectKafkaInputDStream.scala:166)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1$$anonfun$1$$anonfun$apply$7.apply(DStream.scala:350)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1$$anonfun$1$$anonfun$apply$7.apply(DStream.scala:350)
  at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1$$anonfun$1.apply(DStream.scala:349)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1$$anonfun$1.apply(DStream.scala:349)
  at org.apache.spark.streaming.dstream.DStream.createRDDWithLocalProperties(DStream.scala:399)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1.apply(DStream.scala:344)
  at org.apache.spark.streaming.dstream.DStream$$anonfun$getOrCompute$1.apply(DStream.scala:342)
  at scala.Option.orElse(Option.scala:257)
  </code></pre>
  
  <p>and this is my code</p>
  
  <pre><code>public class TwitterStreaming {
       // setup kafka : 
       public static final String ZKQuorum = "localhost:2181";
       public static final String ConsumerGroupID = "ingi2145-analytics";
       public static final String ListTopics = "newTweet";
       public static final String ListBrokers = "localhost:9092"; // I'm not sure about ...
  
      @SuppressWarnings("deprecation")
  public static void main(String[] args) throws Exception {
      // Location of the Spark directory
      String sparkHome = "usr/local/spark";
      // URL of the Spark cluster
      String sparkUrl = "local[4]";
      // Location of the required JAR files
      String jarFile = "target/analytics-1.0.jar";
  // Generating spark's streaming context
  JavaStreamingContext jssc = new JavaStreamingContext(
    sparkUrl, "Streaming", new Duration(1000), sparkHome, new String[]{jarFile});
  // Start kafka stream
  HashSet&lt;String&gt; topicsSet = new HashSet&lt;String&gt;(Arrays.asList(ListTopics.split(",")));
  HashMap&lt;String, String&gt; kafkaParams = new HashMap&lt;String, String&gt;();
  kafkaParams.put("metadata.broker.list", ListBrokers);
  
  //JavaPairReceiverInputDStream&lt;String, String&gt; kafkaStream = KafkaUtils.createStream(ssc, ZKQuorum, ConsumerGroupID, mapPartitionsPerTopics);
  // Create direct kafka stream with brokers and topics
  JavaPairInputDStream&lt;String, String&gt; messages = KafkaUtils.createDirectStream(
      jssc,
      String.class,
      String.class,
      StringDecoder.class,
      StringDecoder.class,
      kafkaParams,
      topicsSet
  );
  
  // get the json file :
     JavaDStream&lt;String&gt; json = messages.map(
          new Function&lt;Tuple2&lt;String, String&gt;, String&gt;() {
              public String call(Tuple2&lt;String, String&gt; tuple2) {
                return tuple2._2();
              }
     });
  </code></pre>
  
  <p>The aim of this project is to compute the 10 bests hashtags from a twitter stream by using a kafka queue. The code was working without kakfa.
  Have you got an idea of what's the problem ?</p>