Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject

1,956 views
Skip to first unread message

Max Nicosia

unread,
Mar 21, 2013, 8:00:57 AM3/21/13
to spark...@googlegroups.com
Hello,

I am trying to follow the instructions for deploying Spark on YARN (StandAlone) from the website and I am getting this error.

I am running Debian and I installed Scala 2.9.2 from the repositories, which could be the reason for the PATH problem.

I have included in both my .bashrc and spark-env.sh files

export SCALA_HOME="/usr/share/java"

but it is still unable to find the right path. Any ideas? Should I remove scala from the package manager and install it to just one location manually?

Thanks!
M

Benoît Denis

unread,
Mar 21, 2013, 8:19:50 AM3/21/13
to spark...@googlegroups.com
I had the same kind of issue, and, as you said, the easiest way to solve it is simply to install manually Scala 2.9.2 in your home directory (or any other directory) and to make SCALA_HOME point to it.
I failed to make it work by installing scala with Debien packages.


2013/3/21 Max Nicosia <mr.max...@gmail.com>

M

--
You received this message because you are subscribed to the Google Groups "Spark Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spark-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Austin Schuh

unread,
Jul 24, 2013, 5:05:57 PM7/24/13
to spark...@googlegroups.com
I was able to get this to work in Debian.

You need to specify SCALA_LIBRARY_PATH as well.

The following works for me.

SCALA_LIBRARY_PATH=/usr/share/java ./run spark.examples.SparkPi

Austin

W.P. McNeill

unread,
Aug 8, 2013, 4:24:01 PM8/8/13
to spark...@googlegroups.com
I encountered the "scala/ScalaObject" error from the SparkPi demo when my SCALA_HOME variable was pointing to a directory that was not a Scala installation. When I got this set correctly, the demo worked. Details here

Ambarish Hazarnis

unread,
Aug 8, 2013, 4:29:37 PM8/8/13
to spark...@googlegroups.com
Ya, I was going to reply just that. Your Scala installation, somehow points to your java installation. :) Happens!
Reply all
Reply to author
Forward
0 new messages