立即注册 登录
About云-梭伦科技 返回首页

sstutu的个人空间 https://www.aboutyun.com/?70 [收藏] [复制] [分享] [RSS]

日志

spark程序运行时问题

已有 963 次阅读2014-7-8 21:23

spark  java程序写完后,执行 java -jar jar包name报如下错误:

Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.remote.log-sent-messages'


或者报

Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes


那是打包时的配置问题,请用shade插件打包,修改pom.xml打包再运行

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-shade-plugin</artifactId>

<version>2.2</version>

<executions>

<execution>

<phase>package</phase>

<goals>

<goal>shade</goal>

</goals>

<configuration>

<filters>

<filter>

<artifact>*:*</artifact>

<excludes>

<exclude>META-INF/*.SF</exclude>

<exclude>META-INF/*.DSA</exclude>

<exclude>META-INF/*.RSA</exclude>

</excludes>

</filter>

</filters>

<transformers>

<transformer

implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

<mainClass>com.a.b.Test</mainClass>

</transformer>

<transformer

implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

<resource>reference.conf</resource>

</transformer>

</transformers>

</configuration>

</execution>

</executions>

</plugin>


路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

关闭

推荐上一条 /2 下一条