Spark报错-java.lang.SecurityException: Invalid signature file digest for Manifest main attributesrk

Issue

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
	at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
	at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
	at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
	at java.util.jar.JarVerifier.update(JarVerifier.java:228)
	at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
	at java.util.jar.JarFile.getInputStream(JarFile.java:450)
	at sun.misc.JarIndex.getJarIndex(JarIndex.java:137)
	at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:675)
	at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:667)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:666)
	at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:639)
	at sun.misc.URLClassPath$3.run(URLClassPath.java:366)
	at sun.misc.URLClassPath$3.run(URLClassPath.java:356)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.misc.URLClassPath.getLoader(URLClassPath.java:355)
	at sun.misc.URLClassPath.getLoader(URLClassPath.java:332)
	at sun.misc.URLClassPath.getResource(URLClassPath.java:198)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:364)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:340)
	at org.apache.spark.util.Utils$.classForName(Utils.scala:238)
	at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:810)
	at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:167)
	at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:195)
	at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
	at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:924)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Answer

原因:打成jar包时存在META-INF/*.RSA META-INF/*.DSA META-INF/*.SF 文件

解决办法:删除META-INF/*.RSA META-INF/*.DSA META-INF/*.SF 文件

zip -d XXX.jar META-INF/*.RSA META-INF/*.DSA META-INF/*.SF

结果
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值