title: NoSuchMethodError: org.apache.kafka.common.network.NetworkSend.<init>
body: <p>I am trying to run <a href="https://github.com/apache/spark/blob/v2.1.0/examples/src/main/scala/org/apache/spark/examples/streaming/DirectKafkaWordCount.scala" rel="nofollow noreferrer">spring example program</a>. After successfull compilation using sbt I am using this following command:</p>
  
  <blockquote>
    <p>spark-submit --class
    org.apache.spark.examples.streaming.DirectKafkaWordCount --jars
    /home/hadoop/jars/kafka_2.11-0.10.2.0.jar,/home/hadoop/jars/spark-streaming_2.11-2.1.0.jar,/home/hadoop/jars/spark-streaming-kafka-0-8_2.11-2.1.0.jar,/home/hadoop/jars/kafka-clients-0.10.0.0.jar,/home/hadoop/jars/metrics-core-2.2.0.jar
    --master local[2] ../streamkafkaprog_2.11-1.0.jar localhost:9092 MyTopic</p>
  </blockquote>
  
  <p>But I am getting :</p>
  
  <blockquote>
    <p>17/03/28 02:15:35 INFO NettyBlockTransferService: Server created on 127.0.0.1:57453
    17/03/28 02:15:35 INFO BlockManager: Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
    17/03/28 02:15:35 INFO BlockManagerMaster: Registering BlockManager BlockManagerId(driver, 127.0.0.1, 57453, None)
    17/03/28 02:15:35 INFO BlockManagerMasterEndpoint: Registering block manager 127.0.0.1:57453 with 413.9 MB RAM, BlockManagerId(driver, 127.0.0.1, 57453, None)
    17/03/28 02:15:35 INFO BlockManagerMaster: Registered BlockManager BlockManagerId(driver, 127.0.0.1, 57453, None)
    17/03/28 02:15:35 INFO BlockManager: Initialized BlockManager: BlockManagerId(driver, 127.0.0.1, 57453, None)
    17/03/28 02:15:36 INFO VerifiableProperties: Verifying properties
    17/03/28 02:15:36 INFO VerifiableProperties: Property group.id is overridden to
    17/03/28 02:15:36 INFO VerifiableProperties: Property zookeeper.connect is overridden to
    17/03/28 02:15:36 INFO SimpleConsumer: Reconnect due to error:
    java.lang.NoSuchMethodError: org.apache.kafka.common.network.NetworkSend.(Ljava/lang/String;Ljava/nio/ByteBuffer;)V
            at kafka.network.RequestOrResponseSend.(RequestOrResponseSend.scala:41)
            at kafka.network.RequestOrResponseSend.(RequestOrResponseSend.scala:44)
            at kafka.network.BlockingChannel.send(BlockingChannel.scala:112)
            at kafka.consumer.SimpleConsumer.liftedTree1$1(SimpleConsumer.scala:85)
            at kafka.consumer.SimpleConsumer.kafka$consumer$SimpleConsumer$$sendRequest(SimpleConsumer.scala:83)
            at kafka.consumer.SimpleConsumer.send(SimpleConsumer.scala:111)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$getPartitionMetadata$1.apply(KafkaCluster.scala:133)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$getPartitionMetadata$1.apply(KafkaCluster.scala:132)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers$1.apply(KafkaCluster.scala:365)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers$1.apply(KafkaCluster.scala:361)
            at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
            at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
            at org.apache.spark.streaming.kafka.KafkaCluster.org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers(KafkaCluster.scala:361)
            at org.apache.spark.streaming.kafka.KafkaCluster.getPartitionMetadata(KafkaCluster.scala:132)
            at org.apache.spark.streaming.kafka.KafkaCluster.getPartitions(KafkaCluster.scala:119)
            at org.apache.spark.streaming.kafka.KafkaUtils$.getFromOffsets(KafkaUtils.scala:211)
            at org.apache.spark.streaming.kafka.KafkaUtils$.createDirectStream(KafkaUtils.scala:484)
            at org.apache.spark.examples.streaming.DirectKafkaWordCount$.main(DitectKafkaProg.scala:60)
            at org.apache.spark.examples.streaming.DirectKafkaWordCount.main(DitectKafkaProg.scala)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738)
            at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
            at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
            at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
            at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
    Exception in thread "main" java.lang.NoSuchMethodError: org.apache.kafka.common.network.NetworkSend.(Ljava/lang/String;Ljava/nio/ByteBuffer;)V
            at kafka.network.RequestOrResponseSend.(RequestOrResponseSend.scala:41)
            at kafka.network.RequestOrResponseSend.(RequestOrResponseSend.scala:44)
            at kafka.network.BlockingChannel.send(BlockingChannel.scala:112)
            at kafka.consumer.SimpleConsumer.liftedTree1$1(SimpleConsumer.scala:98)
            at kafka.consumer.SimpleConsumer.kafka$consumer$SimpleConsumer$$sendRequest(SimpleConsumer.scala:83)
            at kafka.consumer.SimpleConsumer.send(SimpleConsumer.scala:111)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$getPartitionMetadata$1.apply(KafkaCluster.scala:133)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$getPartitionMetadata$1.apply(KafkaCluster.scala:132)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers$1.apply(KafkaCluster.scala:365)
            at org.apache.spark.streaming.kafka.KafkaCluster$$anonfun$org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers$1.apply(KafkaCluster.scala:361)
            at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
            at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
            at org.apache.spark.streaming.kafka.KafkaCluster.org$apache$spark$streaming$kafka$KafkaCluster$$withBrokers(KafkaCluster.scala:361)
            at org.apache.spark.streaming.kafka.KafkaCluster.getPartitionMetadata(KafkaCluster.scala:132)
            at org.apache.spark.streaming.kafka.KafkaCluster.getPartitions(KafkaCluster.scala:119)
            at org.apache.spark.streaming.kafka.KafkaUtils$.getFromOffsets(KafkaUtils.scala:211)
            at org.apache.spark.streaming.kafka.KafkaUtils$.createDirectStream(KafkaUtils.scala:484)
            at org.apache.spark.examples.streaming.DirectKafkaWordCount$.main(DitectKafkaProg.scala:60)
            at org.apache.spark.examples.streaming.DirectKafkaWordCount.main(DitectKafkaProg.scala)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738)
            at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
            at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
            at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
            at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
    17/03/28 02:15:36 INFO SparkContext: Invoking stop() from shutdown hook
    17/03/28 02:15:36 INFO SparkUI: Stopped Spark web UI at <a href="http://127.0.0.1:4040" rel="nofollow noreferrer">http://127.0.0.1:4040</a>
    17/03/28 02:15:36 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
    17/03/28 02:15:36 INFO MemoryStore: MemoryStore cleared
    17/03/28 02:15:36 INFO BlockManager: BlockManager stopped
    17/03/28 02:15:36 INFO BlockManagerMaster: BlockManagerMaster stopped
    17/03/28 02:15:36 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
    17/03/28 02:15:36 INFO SparkContext: Successfully stopped SparkContext
    17/03/28 02:15:36 INFO ShutdownHookManager: Shutdown hook called
    17/03/28 02:15:36 INFO ShutdownHookManager: Deleting directory /tmp/spark-5f636ca8-a2f8-4185-a2d0-a31757d2e721</p>
  </blockquote>
  
  <p>I am using spark 2.1.0,kafka_2.11.0.10.0.0,spark-streaming-kafka-0-8_2.11:2.1.0 and scala-2.11.7.</p>
  
  <p>Please Help me.
  Thanks </p>