title: Integrerate Spark Streaming and Kafka, but get bad symbolic reference error
body: <p>I am trying to integrate Spark streaming and Kafka. I wrote my source code in intellij idea IDE; the complier compiled the code without any error, but when I try to build the jar file, an error message is generated that shows: </p>
  
  <blockquote>
    <p>Error:scalac: bad symbolic reference. A signature in KafkaUtils.class
    refers to term kafka in package  which is not available. It may
    be completely missing from the current classpath, or the version on
    the classpath might be incompatible with the version used when
    compiling KafkaUtils.class.</p>
  </blockquote>
  
  <p>I did research on google, many people say this is because of different versions between Scala version and <code>spark_streaming_kafka</code> jar file. But I have checked the version, they are the same. </p>
  
  <p>Does someone know why this error happened? </p>
  
  <p>Here are more details: </p>
  
  <p>scala version : 2.10 
  spark streaming kafka jar version : spark_streaming_kafka_2.10-1.20.jar,spark_streaming_2.10-1.20.jar </p>
  
  <p>My source code: </p>
  
  <pre><code>object Kafka { 
  
    def main(args: Array[String]) { 
      val master = "local[*]" 
      val zkQuorum = "localhost:2181" 
      val group = "" 
      val topics = "test" 
      val numThreads = 1 
  
      val conf = new SparkConf().setAppName("Kafka") 
      val ssc = new StreamingContext(conf, Seconds(2)) 
  
      val topicpMap = topics.split(",").map((_, numThreads.toInt)).toMap 
  
      val lines = KafkaUtils.createStream(ssc, zkQuorum, group, topicpMap).map(_._2) 
  
      val words = lines.flatMap(_.split(" ")) 
  
      words.print() 
  
      ssc.start() 
      ssc.awaitTermination() 
    } 
  }
  </code></pre>