Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

spark-submit exception

Solved Go to solution
Highlighted

spark-submit exception

New Contributor

./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]

1 ACCEPTED SOLUTION

Accepted Solutions

Re: spark-submit exception

New Contributor

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

6 REPLIES 6

Re: spark-submit exception

Master Collaborator

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.

Re: spark-submit exception

New Contributor
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

Re: spark-submit exception

New Contributor

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

Re: spark-submit exception

New Contributor

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

Re: spark-submit exception

New Contributor

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

Re: spark-submit exception

New Contributor

where did you add the CLASS?