Skip to content

Runnablejar#1

Open
kevingerman wants to merge 2 commits into
sunny1154:masterfrom
kevingerman:runnablejar
Open

Runnablejar#1
kevingerman wants to merge 2 commits into
sunny1154:masterfrom
kevingerman:runnablejar

Conversation

@kevingerman

Copy link
Copy Markdown

Attempting to execute the demo class as ...
java -cp build/libs/SparkSetuDemo-1.0.jar com.sunny.spark.demo.SparkDemo

results in an error having to do with the shade jar created by gradle.

16/11/14 13:48:05 INFO SecurityManager: Changing view acls to: ludyte
16/11/14 13:48:05 INFO SecurityManager: Changing modify acls to: ludyte
16/11/14 13:48:05 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(ludyte); users with modify permissions: Set(ludyte)
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.remote.log-received-messages'

The shade jar overlays all of the contents of dependent jars. This can cause similarly named dependencies to be overwritten. In this case the reference.conf file in each akka jar was overwritten. The resolution described for maven projects is here implemented for gradle using the com.github.johnrengelman.shadow plugin.

build as

./gradlew clean shadowJar

run as

java -jar build/libs/SparkSetuDemo-1.0-all.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants