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

Note that jackson-core 2.15 is now a multi-release jar #897

Closed
pjfanning opened this issue Jan 25, 2023 · 9 comments
Closed

Note that jackson-core 2.15 is now a multi-release jar #897

pjfanning opened this issue Jan 25, 2023 · 9 comments

Comments

@pjfanning
Copy link
Member

  • this is of interest to anyone who creates fat jars for deployment of their apps (if those fat jars include jackson-core)
  • was introduced because the FastDoubleParser code is now a multi-release jar
@cowtowncoder
Copy link
Member

Ok, is this something you can edit, or do you need access? This would probably belong under "Compatibility" section?

@pjfanning
Copy link
Member Author

@cowtowncoder I added a quick mention here - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15#jar-changes

I don't think there is much point in going to a lot of detail.

@cowtowncoder
Copy link
Member

Thank you @pjfanning ! I added bit more context on it being for efficient number parsing.

@cowtowncoder
Copy link
Member

Too bad we don't have an issue/PR existing... but come to think of that, I'll just list this issue in release note file, as a reference.

@cowtowncoder cowtowncoder changed the title 2.15 release notes: mention that jackson-core is now a multi-release jar Note that jackson-core 2.15 is now a multi-release jar Jan 26, 2023
cowtowncoder pushed a commit that referenced this issue Jan 26, 2023
@edward-capriolo-db
Copy link

edward-capriolo-db commented Mar 13, 2024

@cowtowncoder I added a quick mention here - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15#jar-changes

I don't think there is much point in going to a lot of detail.

I think there is a good point in going into detail. :)

Error creating shaded jar: Problem shading JAR

/.m2/com/fasterxml/jackson/core/jackson-core/2.15.2/jackson-core-2.15.2.jar entry META-INF/versions/19/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar.class: java.lang.IllegalArgumentException: Unsupported class file major version 63

My shade plugin that has been happily making spark- uber jars breaks and it is very confusing to sort this out. Like why is my spark 3.5.1 which claims to work work with java 8 to java 19, failing at build and shade plugin complaining about java 19 jars? Am I supposed to exclude this and how?

@pjfanning
Copy link
Member Author

@cowtowncoder I added a quick mention here - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15#jar-changes
I don't think there is much point in going to a lot of detail.

I think there is a good point in going into detail. :)

Error creating shaded jar: Problem shading JAR

/.m2/com/fasterxml/jackson/core/jackson-core/2.15.2/jackson-core-2.15.2.jar entry META-INF/versions/19/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar.class: java.lang.IllegalArgumentException: Unsupported class file major version 63

My shade plugin that has been happily making spark- uber jars breaks and it is very confusing to sort this out. Like why is my spark 3.5.1 which claims to work work with java 8 to java 19, failing at build and shade plugin complaining about java 19 jars? Am I supposed to exclude this and how?

@edward-capriolo-db Multi Release Jar support is an important feature of Java. If your shade plugin does not support it then you should report it to the maintainers of the plugin - or find a new plugin that supports it.

@cowtowncoder
Copy link
Member

As per earlier, https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15 does briefly mention jackson-core 2.15 being multi-release jar.

It might make sense to note that issues have been reported with various things, including older (?) versions of Maven shade plugin.

@edward-capriolo-db
Copy link

edward-capriolo-db commented Mar 13, 2024

@cowtowncoder I added a quick mention here - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15#jar-changes
I don't think there is much point in going to a lot of detail.

I think there is a good point in going into detail. :)
Error creating shaded jar: Problem shading JAR
/.m2/com/fasterxml/jackson/core/jackson-core/2.15.2/jackson-core-2.15.2.jar entry META-INF/versions/19/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar.class: java.lang.IllegalArgumentException: Unsupported class file major version 63
My shade plugin that has been happily making spark- uber jars breaks and it is very confusing to sort this out. Like why is my spark 3.5.1 which claims to work work with java 8 to java 19, failing at build and shade plugin complaining about java 19 jars? Am I supposed to exclude this and how?

@edward-capriolo-db Multi Release Jar support is an important feature of Java. If your shade plugin does not support it then you should report it to the maintainers of the plugin - or find a new plugin that supports it.

I agree that ultimately the issue is an issue with a shade plugin. That being said multi-release jars are a new thing to me. I would assume other people have not seen them as well and are not in the loop. As we know Jackson is baked into lots of things so someone like me has been updating without any extra steps for years, suddenly the process breaks/changes. shade/assemblies are very common and most people aren't following the "shade plugin issue tracker" for cool new features. I actually started running into this issue a few months back and I had a lot of trouble trying to figure out why my java 11 JRE would run Jackson code but my package step was telling me the jar was java 19 :) Now the pieces fit together.

@GedMarc
Copy link

GedMarc commented Mar 14, 2024

Hmm, it's a shade configuration to specify the movement of the META-INF/versions directories to where they must go, not really an error unless just configured wrong.

Another thing to note is the use of Moditect placed in which version folder, depending on what you want it to do, placing it in the incorrect version folder can also give everyone a looooot of headaches.

Big change in JDK23, the native JDK version of "ASM", and the removal of ASM from the JDK internals module - this will also have a direct effect on Multi-Release jars as well, and modularization enhancement capabilities that need to be backwards compatible (y)

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

4 participants