I am new to spark. I am trying to compile and run a spark application that
requires classes from an (external) jar file on my local machine. If I open
the jar (on ~/Desktop) I can see the missing class in the local jar but when
I run spark I get
NoClassDefFoundError: edu/stanford/nlp/ie/AbstractSequenceClassifier
I add the jar to the spark context like this
String[] jars = {"/home/pathto/Desktop/stanford-corenlp-3.5.0.jar"};
SparkConf conf = new SparkConf().setAppName("Simple
Application").setJars(jars);
Then I try to run a submit script like this
/home/me/Downloads/spark-1.2.0-bin-hadoop2.4/bin/spark-submit \
--class "SimpleApp" \
--master local[4] \
target/simple-project-1.0.jar \
--jars local[4] /home/abe/Desktop/stanford-corenlp-3.5.0.jar
and hit the NoClassDefFoundError.
I get that this means that the worker threads can't find the class from the
jar. But I am not sure what I am doing wrong. I have tried different
syntaxes for the last line (below) but none works.
--addJars local[4] /home/abe/Desktop/stanford-corenlp-3.5.0.jar
--addJars local:/home/abe/Desktop/stanford-corenlp-3.5.0.jar
--addJars local:/home/abe/Desktop/stanford-corenlp-3.5.0.jar
How can I fix this error?
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Why-can-t-Spark-find-the-classes-in-this-Jar-tp21584.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]