周蓬勃

Spark 之 Invalid signature file d

2018-04-26  本文已影响1人  步闲

在一个项目中既写有scala代码,又写有Java代码,在将Java代码打包成可执行包运行时报错如下:

java -jar ***.jar

Error: Could not find or load main class com.xcar.suggest.tag.related_brand_car_mfrs_tag.TagItemPoolKafkaConsumer
改Hadoop方式运行:
hadoop  jar  ***.jar

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:286)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:239)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:317)
    at java.util.jar.JarVerifier.update(JarVerifier.java:228)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:348)
    at java.util.jar.JarFile.getInputStream(JarFile.java:415)
    at org.apache.hadoop.util.RunJar.unJar(RunJar.java:101)
    at org.apache.hadoop.util.RunJar.unJar(RunJar.java:81)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:209)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
解决方式:
zip -d ***.jar META-INF/*.RSA META-INF/*.DSA META-INF/*.SF

OK !

上一篇 下一篇

猜你喜欢

热点阅读