title: Scala: Spark exception when project includes Akka
body: <p>I have a project that uses spark, and I want to use Akka in it. The project worked fine before, but when I added this to <code>build.sbt</code>:</p>
  
  <pre><code>libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.3"
  </code></pre>
  
  <p>And try to run the project, I get this error:</p>
  
  <blockquote>
    <p>[error] (run-main-0) org.apache.spark.SparkException: Job aborted due to stage failure: Task serialization failed: java.lang.ClassNotFoundException: scala.Function0 <br>
    [error] java.lang.ClassNotFoundException: scala.Function0 <br>
    [error]     at sbt.classpath.ClasspathFilter.loadClass(ClassLoaders.scala:63) <br>
    [error]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)<br>
    [error]     at java.lang.Class.forName0(Native Method)<br>
    [error]     at java.lang.Class.forName(Class.java:348)<br>
    [error]     at com.twitter.chill.KryoBase$$anonfun$1.apply(KryoBase.scala:41)<br>
    [error]     at com.twitter.chill.KryoBase$$anonfun$1.apply(KryoBase.scala:41)<br>
    [error]     at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)<br>
    [error]     at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)<br>
    [error]     at scala.collection.immutable.Range.foreach(Range.scala:160)<br>
    [error]     at <br>scala.collection.TraversableLike$class.map(TraversableLike.scala:234)<br>
    [error]     at scala.collection.AbstractTraversable.map(Traversable.scala:104)<br>
    [error]     at com.twitter.chill.KryoBase.(KryoBase.scala:41)</p>
  </blockquote>
  
  <p>Any ideas?</p>