spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd <bit1...@163.com>
Subject Re:Re: Exception throws when running spark pi in Intellij Idea that scala.collection.Seq is not found
Date Tue, 25 Aug 2015 08:24:11 GMT
Thanks you guys.
Yes, I have fixed the guava and spark core and scala and jetty. And I can run Pi now.






At 2015-08-25 15:28:51, "Jeff Zhang" <zjffdu@gmail.com> wrote:

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 <hemant9379@gmail.com> 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: 


https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html







On Tue, Aug 25, 2015 at 12:18 PM, Todd <bit1129@163.com> wrote:

I cloned the code from https://github.com/apache/spark 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(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: scala.collection.Seq
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more









--

Best Regards

Jeff Zhang
Mime
View raw message