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.

Cannot load main class from JAR file

Cannot load main class from JAR file

New Contributor

Am using below command 

spark-submit –class “com.manu.hadoop.SparkMllib.SVM” –master local[4] /home/cloudera/Desktop/SparkMllib/target/SparkMllib-0.0.1-SNAPSHOT-jar-with-dependencies /home/cloudera/Desktop/training /home/cloudera/Desktop/training/test 100

 

but am getting error like Error: Cannot load main class from JAR file:

1 REPLY 1
Highlighted

Re: Cannot load main class from JAR file

Champion
I think you are just missing the file extension for your jar file. Try changing

/home/cloudera/Desktop/SparkMllib/target/SparkMllib-0.0.1-SNAPSHOT-jar-with-dependencies to

/home/cloudera/Desktop/SparkMllib/target/SparkMllib-0.0.1-SNAPSHOT-jar-with-dependencies.jar

The error is complaining that you did not specific a JAR file which should be the last entry prior to any application arguments.