As I remember, you also need to change guava and jetty related dependency to compile if you run to run SparkPi in intellij.

On Tue, Aug 25, 2015 at 3:15 PM, Hemant Bhanawat <> wrote:
Go to the module settings of the project and in the dependencies section check the scope of scala jars. It would be either Test or Provided. Change it to compile and it should work. Check the following link to understand more about scope of modules:

On Tue, Aug 25, 2015 at 12:18 PM, Todd <> wrote:
I cloned the code from to my machine. It can compile successfully,
But when I run the sparkpi, it throws an exception below complaining the scala.collection.Seq is not found.
I have installed scala2.10.4 in my machine, and use the default profiles: window,scala2.10,maven-3,test-java-home.
In Idea, I can find that the Seq class is on my classpath:

Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Seq
    at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at com.intellij.rt.execution.application.AppMain.main(
Caused by: java.lang.ClassNotFoundException: scala.collection.Seq
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    ... 6 more

Best Regards

Jeff Zhang