请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

打的jar运行时报错

我在windows上打的jar,放在linux上运行时报错;
Exception in thread “main” java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:240)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:307)
at java.util.jar.JarVerifier.update(JarVerifier.java:218)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:345)

org.apache.spark.deploy.SparkSubmit.org.org.orgapachesparksparksparkdeploySparkSubmitSparkSubmitSparkSubmitrunMain(SparkSubmit.scala:695)atorg.apache.spark.deploy.SparkSubmitrunMain(SparkSubmit.scala:695) at org.apache.spark.deploy.SparkSubmitrunMain(SparkSubmit.scala:695)atorg.apache.spark.deploy.SparkSubmit.doRunMain1(SparkSubmit.scala:187)atorg.apache.spark.deploy.SparkSubmit1(SparkSubmit.scala:187) at org.apache.spark.deploy.SparkSubmit1(SparkSubmit.scala:187)atorg.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:212)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

在服务器上运行的命令为:
spark-submit \

–class com.imooc.spark.SQLContextApp
–master local[2]
/home/hadoop/lib/ImoocSparkSQLProject.jar
file:///home/hadoop/app/spark-2.1.0-bin-2.6.0-cdh5.7.0/examples/src/main/resources/people.json
麻烦老师看下怎么解决?

正在回答 回答被采纳积分+3

2回答

Michael_PK 2018-09-08 11:46:18

再次: 提交脚本—name?

0 回复 有任何疑惑可以回复我~
  • 我写错了,是—master?
    回复 有任何疑惑可以回复我~ 2018-09-08 11:46:46
Michael_PK 2018-09-08 11:45:50

首先:你是maven打包吗? 其次:你的submit脚本换行了没有\?

0 回复 有任何疑惑可以回复我~
  • 提问者 慕圣8049820 #1
    是用maven打包的,submit提交行都带了换行符的;
    spark-submit \
    --class com.imooc.spark.SQLContextApp \
    --master local[2] \
    /home/hadoop/lib/ImoocSparkSQLProject.jar \
    file:///home/hadoop/app/spark-2.1.0-bin-2.6.0-cdh5.7.0/examples/src/main/resources/people.json
    
    我多次尝试在linux上提交运行,均报上面相同的错误;
    烦请老师帮忙看看
    回复 有任何疑惑可以回复我~ 2018-09-08 11:57:21
  • Michael_PK 回复 提问者 慕圣8049820 #2
    用mvn命令打包
    回复 有任何疑惑可以回复我~ 2018-09-08 12:14:00
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信