Reply
New Contributor
Posts: 5
Registered: ‎10-22-2015
Accepted Solution

spark-submit exception

./spark-submit --class "SimpleApp" --master local[4] /home/cloudera/Downloads/simple-project_2.10-1.0.jar dp.txt
java.lang.ClassNotFoundException: SimpleApp
    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 java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:538)
    at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:166)
    at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:189)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:110)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Cloudera Employee
Posts: 481
Registered: ‎08-11-2014

Re: spark-submit exception

Please give more information than just a command line and stack trace. You don't have "SimpleApp" in that JAR, or it's not the fully qualified name of the class.

New Contributor
Posts: 5
Registered: ‎10-22-2015

Re: spark-submit exception

i have created SimpleApp.scala and build a jar on top of it by sbt package command in windows and ran this command ./spark-submit --class "SimpleApp" --master local[4] /home/example/SL/simple-project_2.10-1.0.jar , its giving javaclassnotfoundexception not sure how to resolve it, please help me out
New Contributor
Posts: 5
Registered: ‎10-22-2015

Re: spark-submit exception

JAR exists , correct i too believe it's not the fully qualified name of the class, how do we set fully qualified name of the class, please suggest

New Contributor
Posts: 5
Registered: ‎10-22-2015

Re: spark-submit exception

Its resolved, Thank you so much, CLASS is missing from the jar

New Contributor
Posts: 2
Registered: ‎12-08-2015

Re: spark-submit exception

How did you resolve it. after 'sbt package' or 'sbt clean package'. how can I make class into jar?

Highlighted
New Contributor
Posts: 1
Registered: ‎08-18-2018

Re: spark-submit exception

where did you add the CLASS?