> ./gradlew --version
------------------------------------------------------------
Gradle 6.1.1
------------------------------------------------------------
Kotlin:       1.3.61
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.18

//inside build.gradle
dependencies {
...
classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0"
...
}

According to the compatibility table here: https://github.com/johnrengelman/shadow, gradle 6.1.1 with shadow 6.1.0 and Java 11 should be compatible. However when I try to build using ./gradlew build shadowJar I get an error about:

2023-08-03T14:54:20.719-0700 [ERROR] [com.github.jengelman.gradle.plugins.shadow.tasks.ShadowCopyAction] ex
java.lang.IllegalArgumentException: Unsupported class file major version 63

According to here, version 63 is Java 19. Both ./gradlew and java --version are telling me I'm using 11.0.18 so where does this error about major version 63 come from?

1

There are 1 best solutions below

0
hilmialf On

I had similar problem recently. For me the culprit was Jackson version 2.15.1. Switching down to 2.14.2 solves the problem.

solr seems to use jackson version 2.15.2 (https://github.com/apache/solr/blob/de234cb9a30d28dd46f3c1eb96732a0bd0f08b8d/versions.props#L8C1-L8C41) so you might want to exclude from shadow and use lower version instead.