title: NoClassDefFoundError: scala/Product$class
body: <p>I am new to scala and I am trying to create a mixed project with Scala and Java.
  However I am facing some issues when I run the test code. When I run the test, I am getting an error</p>
  
  <p><img src="https://i.stack.imgur.com/LbB0L.png" alt="[]"></p>
  
  <p>and my pom.xml as follows:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;scala.version&gt;2.12.2&lt;/scala.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-library&lt;/artifactId&gt;
          &lt;version&gt;${scala.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-compiler&lt;/artifactId&gt;
          &lt;version&gt;${scala.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
          &lt;artifactId&gt;scala-reflect&lt;/artifactId&gt;
          &lt;version&gt;${scala.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-streaming_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
          &lt;artifactId&gt;spark-streaming-kafka-0-10_2.11&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.scala-tools&lt;/groupId&gt;
              &lt;artifactId&gt;maven-scala-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.15.2&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;compile&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;test-compile&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;testCompile&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;test-compile&lt;/phase&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.5&lt;/source&gt;
                  &lt;target&gt;1.5&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>My code as follows:</p>
  
  <pre><code>class BptConsumer {
  
  def consumeLogevent(): Unit ={
    val conf = new SparkConf().setMaster("local[2]").setAppName("PVStatistics");
    val ssc = new StreamingContext(conf,Seconds(5));
  
    val kafkaParams = Map[String, Object](
      "bootstrap.servers" -&gt; "172.20.13.196:9092",
      "key.deserializer" -&gt; classOf[StringDeserializer],
      "value.deserializer" -&gt; classOf[StringDeserializer],
      "group.id" -&gt; "1",
      "auto.offset.reset" -&gt; "latest",
      "enable.auto.commit" -&gt; (false: java.lang.Boolean)
    )
  
    val topics = Array("fd-blogs-tst")
  
    val stream = KafkaUtils.createDirectStream[String, String](
      ssc,
      PreferConsistent,
      Subscribe[String, String](topics, kafkaParams)
    )
    /*val rdd = stream.transform(x=&gt;RDD[String]);*/
    val lines = stream.map(record =&gt; (record.key,record.value))
  
    lines.print();
    ssc.start();
    ssc.awaitTermination();
  }
  }
  </code></pre>
  
  <p>Could someone help me out in finding the issue?</p>