Reply
New Contributor
Posts: 1
Registered: ‎07-31-2017

Cannot load main class from JAR file

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:

Highlighted
Posts: 642
Topics: 3
Kudos: 105
Solutions: 67
Registered: ‎08-16-2016

Re: Cannot load main class from JAR file

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.
Announcements