Closed zzvara closed 1 year ago
@zzvara Thanks for the report. Could you tell us which version of JDK you're using plz? ASM is often sensitive to bytecode instructions/flags that gets added in JDK.
@eed3si9n Thanks for asking!
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
running in WSL.
Removing:
ShadeRule
.zap("org.apache.spark.unused.UnusedStubClass")
.inAll
and moving Spark dependency to provided
fixed it.
Not a hard problem, but this will force us to deal with classpath conflicts in runtime in the Spark container (in this case the Kubernetes Spark image and the /jars
directory there that is filled with unshaded dependencies.)
I stumbled upon the same problem in a separate project with SBT assembly 1.5.0.
Spark is already "provided"-scope in the project.
I had the same error for a class defined as:
@throws(classOf[IllegalArgumentException])
class Foo[T: ClassTag](bar: Seq[String]) extends Something { ... }
After the exception annotation was removed, the assembly proceeded without errors:
class Foo[T: ClassTag](bar: Seq[String]) extends Something { ... }
This annotation is not needed anyway since IllegalArgumentException is an unchecked exception.
I'm guessing that ASM version needs to be updated by jarjar but there's no owner for the project anymore.
Should be fixed now.
The below shading worked correctly earlier.
SBT 1.3.10, Scala 2.12.11 openjdk 11.0.6 2020-01-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
Plugins:
Build model:
Command:
Error: