How to spark-submit with main class in jar?

前端 未结 4 1978
慢半拍i
慢半拍i 2021-02-10 15:02

There are a ton of questions about ClassNotFoundException but I haven\'t seen any (yet) that fit this specific case. I am attempting to run the following command:

4条回答
  •  有刺的猬
    2021-02-10 15:44

    Looking at your pom file, the jar file you are referencing doesn't match with what you have in the pom file as

      scala-ts
      1.0-SNAPSHOT
    

    The above two line in pom file suggests that your jar file should be scala-ts-1.0-SNAPSHOT.jar but you have used scala-ts.jar only. So I am assuming you are referencing old jar.

    Here are few steps you can apply

    1. clean the project and package again
    2. make sure the jar file name by going to target folder of the project
    3. you can give the exact path to the target folder to point to the jar when you apply spark-submit command
    

提交回复
热议问题