-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported class file major version 68 error with shading multi-release JAR #1220
Labels
Comments
ClassReader(byte[] classFileBuffer, int classFileOffset, boolean checkClassVersion) {
this.classFileBuffer = classFileBuffer;
this.b = classFileBuffer;
if (checkClassVersion && this.readShort(classFileOffset + 6) > 67) {
throw new IllegalArgumentException(stringConcat$0(this.readShort(classFileOffset + 6)));
} else {
// ...
}
} ASM 9.7.1 was updated in Jdependency at tcurdt/jdependency#302 but has not been released. |
Filed to tcurdt/jdependency#324. |
1 task
Addressing a fix to graphql-java/graphql-java#3806. |
What a legend! Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: