title: Spark word Count Error in IntelliJ due to scala 2.12.1
body: <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError:
    scala/Product$class at
    org.apache.spark.SparkConf$DeprecatedConfig.(SparkConf.scala:762)
    at org.apache.spark.SparkConf$.(SparkConf.scala:615) at
    org.apache.spark.SparkConf$.(SparkConf.scala) at
    org.apache.spark.SparkConf.set(SparkConf.scala:84) at
    org.apache.spark.SparkConf.set(SparkConf.scala:73) at
    org.apache.spark.SparkConf.setMaster(SparkConf.scala:105)</p>
  </blockquote>
  
  <pre><code>package bigdata.spark_applications
  import org.apache.spark.SparkConf
  import org.apache.spark.SparkContext
  import org.apache.spark.SparkContext._
  object WordCount {
    def main(args: Array[String]): Unit = {
      val conf = new SparkConf().setMaster("local").setAppName("WordCount")
      val sc = new SparkContext(conf)
      val data = sc.textFile("C:\\Users\\scala.txt")
      val result = data.flatMap(_.split(" ")).map(word =&gt; (word , 1)).reduceByKey(_ + _)
      result.collect.foreach(println)
    }
  </code></pre>