You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I asked the ByteBuddy folks and they suggested it may be an issue with the Shadow plugin raphw/byte-buddy#1763, however I appreciate this is a tough and unusual edge case, I'm not sure what the cause of the issue is. I saw a similar issue on Jackson, another multi-release JAR: FasterXML/jackson-core#1210. In that thread they suggest excluding META-INF folders (such as the ones containing Java 24 code), but after giving that a try, I still get the same error "Unsupported class file" locally. The same suggestion to exclude META-INF folders is made in this Shadow thread #877 (comment)
I also tried adding Multi-Release: true to the shadow JAR's attributes, the error still persists.
Is there something else I can do to exclude the Java 24 files from the multi-release JAR from the ShadowJar task? I noticed there is an unreleased PR that may target the problem https://github.com/GradleUp/shadow/pull/1200/files. Is it possible to do another beta release and I can test this change?
Thanks!
Related environent and versions
In the PR I tried the latest version of Shadow 8.3.5. I also gave it a try locally with 9.0.0-beta6 and the error persists
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 68
at org.vafer.jdeb.shaded.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
at org.vafer.jdeb.shaded.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
at org.vafer.jdeb.shaded.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
at org.vafer.jdeb.shaded.objectweb.asm.ClassReader.<init>(ClassReader.java:288)
Expected and Results
Hello, first of all thanks for maintaining this excellent library, I really appreciate you continuing the great work and keeping the project going.
I'm a maintainer of GraphQL Java, we have a small Agent tool, which uses ByteBuddy. ByteBuddy is a multi-release JAR.
When I upgrade from ByteBuddy 1.15.11 to 1.16.0, I see an unusual error message "Unsupported class file major version 68", which is odd because GraphQL Java is using Java 11 only, not version 68 (Java 24). You can see the build pipeline with stacktrace: https://github.com/graphql-java/graphql-java/actions/runs/12934658930/job/36076178664
Reproduction If you revert this PR, you can see a reproduction of the error: https://github.com/graphql-java/graphql-java/pull/3799/files
I asked the ByteBuddy folks and they suggested it may be an issue with the Shadow plugin raphw/byte-buddy#1763, however I appreciate this is a tough and unusual edge case, I'm not sure what the cause of the issue is. I saw a similar issue on Jackson, another multi-release JAR: FasterXML/jackson-core#1210. In that thread they suggest excluding META-INF folders (such as the ones containing Java 24 code), but after giving that a try, I still get the same error "Unsupported class file" locally. The same suggestion to exclude META-INF folders is made in this Shadow thread #877 (comment)
I also tried adding
Multi-Release: true
to the shadow JAR's attributes, the error still persists.Is there something else I can do to exclude the Java 24 files from the multi-release JAR from the ShadowJar task? I noticed there is an unreleased PR that may target the problem https://github.com/GradleUp/shadow/pull/1200/files. Is it possible to do another beta release and I can test this change?
Thanks!
Related environent and versions
In the PR I tried the latest version of Shadow
8.3.5
. I also gave it a try locally with9.0.0-beta6
and the error persistsReproduction steps
Reproduction If you revert this PR, you can see a reproduction of the error: https://github.com/graphql-java/graphql-java/pull/3799/files
Anything else?
No response
The text was updated successfully, but these errors were encountered: