title: java.lang.ClassNotFoundException: org.apache.spark.sql.Dataset
body: <p>When running a Scala file that uses the Spark <code>Dataset</code> type I get the following stack trace:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/sql/Dataset
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
      at java.lang.Class.getMethod0(Class.java:3018)
      at java.lang.Class.getMethod(Class.java:1784)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:125)
  Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.Dataset
      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)
      ... 6 more
  </code></pre>
  
  <p>I find this strange because I have the following import:</p>
  
  <pre><code>import org.apache.spark.sql._
  </code></pre>
  
  <p>Also, in my <code>build.sbt</code> I have the following added to <code>libraryDependencies</code>:</p>
  
  <pre><code>  "org.apache.spark" %% "spark-core" % "1.6.2" % "provided",
    "org.apache.spark" %% "spark-sql" % "1.6.2" % "provided",
  </code></pre>