Skip to content
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

1.0.0 release only supports very recent JVMs #79

Closed
pjfanning opened this issue Dec 10, 2023 · 4 comments
Closed

1.0.0 release only supports very recent JVMs #79

pjfanning opened this issue Dec 10, 2023 · 4 comments

Comments

@pjfanning
Copy link
Contributor

pjfanning commented Dec 10, 2023

Jackson still supports Java 8 but fastdoubleparser has at least some classes that have class file major version 66 - might be java 22

Jackson built fine with fastdoubleparser 0.9.0.

This could be a shortcoming of maven plugins - that don't know about Java 22. In fairness, Java 22 is only early access and many build tools really struggle to keep up.

Error:  Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.5.1:shade (shade-jackson-core) on project jackson-core: Error creating shaded jar: Problem shading JAR /home/runner/.m2/repository/ch/randelshofer/fastdoubleparser/1.0.0/fastdoubleparser-1.0.0.jar entry META-INF/versions/22/ch/randelshofer/fastdoubleparser/FastDoubleSwar.class: java.lang.IllegalArgumentException: Unsupported class file major version 66 

Edit: This seems to be a shortcoming of maven-shade-plugin but I think I have managed to work around it by excluding the java 22 classes that are in META-INF/versions/22/ch/randelshofer/fastdoubleparser

@pjfanning
Copy link
Contributor Author

@wrandelshofer feel free to ignore this (or close it) - FasterXML/jackson-core#1163 has worked around this issue

@wrandelshofer
Copy link
Owner

Oh, I am surprised that 1.0.0 does not work.

fastdoubleparser is a multi-release Jar. Supporting JDK 8 through 22.
Even older releases included compiled classes for early-access JVMs. So far, these worked for me.

@pjfanning
Copy link
Contributor Author

A lot of build tools like maven-shade-plugin and gradle struggle to maintain support for new JDKs - FasterXML/jackson-core#955 is another report.

I don't know why they can't just ignore classes in META-INF/versions/x where the x is a version newer than they support.

@wrandelshofer
Copy link
Owner

wrandelshofer commented Dec 16, 2023

Closing this, because this is a bug in older versions of the Gradle build system.
Older versions of Gradle can not handle multi-release Jars properly. Because they attempt to instrument classes in the META-INF/versions folders that are not supported by the JVM on which Gradle runs.
See gradle/gradle#24390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants