I am having an issue similar to Invalid signature file digest for Manifest main attributes exception while trying to run jar file but cannot get this or a number of other fixes to work using build.sbt and building the artifacts from IntelliJ 2018.1
The project was started in IntelliJ as a scala>sbt project Java version is 1.8.0_77
My build.sbt contains:
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
"org.scalatest" %% "scalatest" % "3.0.5" % "test",
"org.apache.spark" % "spark-core_2.11" % "2.3.0",
"org.apache.spark" % "spark-sql_2.11" % "2.3.0",
"com.amazonaws" % "aws-java-sdk" % "1.7.4",
"org.apache.hadoop" % "hadoop-aws" % "2.7.1"
)
excludeFilter in Compile := "*.SF" || "*.DSA" || "*.RSA"
The project builds without any error and runs fine in IntelliJ but when I Build> Build Artifacts and run the resulting jar from the command-line on the same machine as IntelliJ is running on:
java -jar myApp.jar
I get:
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes