Home:ALL Converter>spark-submit failed to load class on windows 10

spark-submit failed to load class on windows 10

Ask Time:2022-09-21T05:39:47         Author:LorenzoGi

Json Formatter

Context: Scala, Spark application, fat JAR, spark 3.3.0, windows 10

IDE:IntelliJ IDEA 2022.2.2

Package: it..<...>.MyPackage

MainClass : it..<...>.MyPackage.Application

Jar building: using sbt-assembly, or with Build Artifact (JAR)

Problem: in both cases, building jar with sbt or with IntelliJ

spark-submit --verbose --master local --class it.<company>.<...>.MyPackage.Application 
C:\<path to jar\MyPackage.jar 10

Error: Failed to load class it..<...>.MyPackage.Application. 22/09/20 23:14:25 INFO ShutdownHookManager: Shutdown hook called

End of the story. Notes: Same JAR, moved to an instance of Spark running on MacOS, no problem...

Thanks for any suggestion Lorenzo

Author:LorenzoGi,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/73792925/spark-submit-failed-to-load-class-on-windows-10
yy