title: Spark Error: Could not initialize class org.apache.spark.rdd.RDDOperationScope
body: <p>I've created a spark standalone cluster on my laptop,
  then I go into an sbt console on a spark project and try to embed a spark instance as so:</p>
  
  <pre><code>val conf = new SparkConf().setAppName("foo").setMaster(/* Spark Master URL*/)
  val sc = new SparkContext(conf)
  </code></pre>
  
  <p>Up to there everything works fine, then I try</p>
  
  <pre><code>sc.parallelize(Array(1,2,3))
  // and I get: java.lang.NoClassDefFoundError: Could not initialize class org.apache.spark.rdd.RDDOperationScope$
  </code></pre>
  
  <p>How do I fix this?</p>