title: java.lang.LinkageError in Spark Streaming
body: <p>I am using Spark 2.2 on CDH 5.10 cluster with Scala 2.11.8. Everything was working fine but then I suddenly started getting this in the Driver code:</p>
  
  <pre><code>     Exception in thread "main" java.lang.LinkageError: loader constraint violation: when resolving method 
      "org.apache.spark.streaming.StreamingContext$.getOrCreate(Ljava/lang/String;Lscala/Function0;Lorg/apache/hadoop/conf/Configuration;Z)Lorg/apache/spark/streaming/StreamingContext;" 
      the class loader (instance of org/apache/spark/util/ChildFirstURLClassLoader) of the current class, com/hp/hawkeye/driver/StreamingDriver$, 
      and the class loader (instance of sun/misc/Launcher$AppClassLoader)
   for the method's defining class, org/apache/spark/streaming/StreamingContext$, 
  have different Class objects for the type scala/Function0 used in the signature
  </code></pre>
  
  <p>Any ideas how I can fix this?</p>