2
$\begingroup$

I installed Hadoop, Mahout and Spark. I am able to see the Hadoop and Spark MasterWebUI. Moreover, I can also run the following command,

[hadoop@muildevcel01 mahout]$ bin/mahout

However, we I try running the spark-shell I run in the problem stated below,

[hadoop@muildevcel01 mahout]$ bin/mahout spark-shell

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/repl/SparkILoop
        at org.apache.mahout.sparkbindings.shell.Main.main(Main.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.repl.SparkILoop
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more

Question

Any suggestions how I could resolve my problem?

$\endgroup$

1 Answer 1

1
$\begingroup$

This error is common when the SPARK_HOME environment variable is not set.

In the shell type export SPARK_HOME=/path/to/your/spark

$\endgroup$
1
  • 1
    $\begingroup$ Thanks @rawtrevo this was the root cause , I have solved it long time back. Forgot to update here $\endgroup$ Jul 17, 2017 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.