title: NoClassDefFoundError with spark
body: <p>I'm trying to run an extremely trivial spark context instance using IntelliJ. However, I'm running into an issue where I'm receiving a <code>NoClassDefFoundError</code>:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: scala/Product$class
      at org.apache.spark.SparkConf$DeprecatedConfig.&lt;init&gt;(SparkConf.scala:609)
      at org.apache.spark.SparkConf$.&lt;init&gt;(SparkConf.scala:473)
      at org.apache.spark.SparkConf$.&lt;clinit&gt;(SparkConf.scala)
      at org.apache.spark.SparkConf.set(SparkConf.scala:71)
      at org.apache.spark.SparkConf.setAppName(SparkConf.scala:86)
      at test$.main(test.scala:8)
      at test.main(test.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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  Caused by: java.lang.ClassNotFoundException: scala.Product$class
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 12 more
  Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
  17/01/27 00:24:37 INFO Utils: Shutdown hook called
  </code></pre>
  
  <p>I've tried shifting everything from my Sbt versions to Scala versions. Here are my configurations:</p>
  
  <p><a href="https://i.stack.imgur.com/BLokg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BLokg.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/A21cK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A21cK.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/2ZSYq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ZSYq.png" alt="enter image description here"></a></p>
  
  <p>I'm trying to run this code:</p>
  
  <pre><code>import org.apache.spark.{SparkConf, SparkContext}
  
  object test {
    def main(args: Array[String]): Unit = {
      val conf = new SparkConf()
      conf.setAppName("test")
      conf.setMaster("local[2]")
      val sc = new SparkContext(conf)
      println(sc)
    }
  }
  </code></pre>
  
  <p>Is there anything that I don't know about Scala and Spark version incompatibilities?</p>