Skip to content

Issue 6036: Support for Jackson3 - #6048

Merged
dmatej merged 1 commit into
eclipse-ee4j:4.xfrom
jolarsen:jackson3
Jun 11, 2026
Merged

dmatej merged 1 commit into
eclipse-ee4j:4.xfrom
jolarsen:jackson3

Conversation

@jolarsen

@jolarsen jolarsen commented Jan 11, 2026 •

Copy link
Copy Markdown

New module json-jackson3 in media, examples, and performance tests. Based on the existing json-jackson module

  • Source code from jackson-jakarta-rs-providers - branch 3.x. Using only jakarta - coordinates.
  • Adapter-code from json-jackson modified to fit Jackson 3. Moved some code from DefaultProvider to MapperConfigurator due to immutable mappers and builder-pattern.
  • Opted for separate version for jackson-annotations in pom.xml beacuse of new pattern - version "2.20" is the latest and needed for Jackson3.
  • Updated tests to variations of NoCtorDeserModule since Jdk8Module is no longer an issue and expanded with POST
  • Using JsonMapper rather than ObjectMapper
  • Replaced JaxRs-references with JakartaRS in comments, classnames and imports

For discussion:

  • Drop support for maxStringLength (in JacksonFeature and not look at MessageProperties) ?

Testing: Apart from updated tests in media / json-jackson3, I have done this:

  • Tried json-jackson3 in various tests/integration (2322, 2689, 2673) and benchmark
  • Tried out a locally built version with another project I am working on (server with 50-100 endpoints)
  • FilteringProvider is least tested as there were "few" tests in json-jackson and I do not have any other cases at hand

Closes #6036

@reneleonhardt

Copy link
Copy Markdown

Great work, thank you so much for your big contribution! ❤️

Please be aware: Copyright checking failed
https://ci.eclipse.org/jersey/job/ci-cd-integration/job/PR-6048/1/pipeline-overview/?start-byte=0&selected-node=22#log-22-854

@jolarsen

Copy link
Copy Markdown
Author

@reneleonhardt I'm looking into the copyright-warnings. I am not familiar with the practices here, so I'll need some guidance

@reneleonhardt

Copy link
Copy Markdown

I'm not a Jersey maintainer, I guess glassfish-copyright-maven-plugin wants a copyright + license notice in every file, it will probably be enough to copy from another source file and change the year to 2026 for new files.
https://javaee.github.io/glassfish/wiki-archive/Copyrights.html

@jolarsen

Copy link
Copy Markdown
Author

Jenkins stopped working after 1h23 mins - in the middle of jersey-tests-osgi-functional (287/387).
jersey-media-json-jackson3 built OK https://ci.eclipse.org/jersey/job/ci-cd-integration/job/PR-6048/4/consoleFull
Jenkins Error: "Creating placeholder flownodes because failed loading originals.
ERROR: Cannot resume build because FlowNode 22 for FlowHead 1 could not be loaded. "

Can someone with access trigger a new build? Or should I just commit a NOOP-change ?

@reneleonhardt

Copy link
Copy Markdown

Megabytes of logs... I remember when unit tests were only allowed to print dots, good times 😄

@senivam

senivam commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@jolarsen Thank you for adding the Jackson3 support! In order to avoid dependency convergence, I've also adopted Jackson 2.20 (my commit is added to your PR). In total, this should work, and all checks should be OK now.

@senivam

senivam commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Oops, I had to re-write that because I didn't notice that the 2.20 is only applicable for Jackson annotations.

@jolarsen

Copy link
Copy Markdown
Author

@senivam Jackson3 uses com.fasterxml for jackson-annotations - and needs 2.20 for JsonFormat.POJO
Jackson-annotations started a new release-numbering (2.20 vs 2.20.0). This is a bit confusing and we will have to see what versions of jackson-annotations are included in databind 2.2x.y and modules.
Running dependency-convergence.sh or mvn enforcer locally does not report all problem.

But lets try to find a path to complete the PR. There are many users who want to do the Jackson3-migration - which is a fair amount of changes - new coordinates, immutable mappers, builders, etc.

@senivam

senivam commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@jolarsen , I was hoping to solve this without exclusions. Dependency convergence check should work similarly both locally and on Jenkins. It, however, requires previously built artifacts to be prepared for the check. As I'm running it with Jackson 2.20.1 adopted, it does not fail for jackson annotations convergence.

@jolarsen

Copy link
Copy Markdown
Author

When I tried locally - mvn enforcer reported problems with tests/integration/jackson-14 - but not media/json-jackson.
Thus the exclusions to avoid another 2 hour build showing new discoveries. databind is the one pulling inn annotations.
I agree that we should avoid exclusions and keep these 3 jackson-versions in sync (ref jackson-bom version numbers).

@senivam

senivam commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@jolarsen OK, clear. I hope this time the build will finally pass OK.

@jolarsen

Copy link
Copy Markdown
Author

Jjenkins resigned with "pool-979-thread-1: Retried waiting for GCLocker too often allocating 1250002 words"

@senivam

senivam commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Finally it passed fine

@jolarsen

Copy link
Copy Markdown
Author

@senivam Thanks for helping out !
Now we should get some feedback on the implementation

@senivam senivam linked an issue Jan 13, 2026 that may be closed by this pull request
@arjantijms
arjantijms deleted the branch eclipse-ee4j:4.x January 14, 2026 19:38
@arjantijms arjantijms closed this Jan 14, 2026
@arjantijms arjantijms reopened this Jan 14, 2026
@arjantijms
arjantijms changed the base branch from 4.0 to 4.x January 14, 2026 20:19
@jolarsen

jolarsen commented Jan 20, 2026 •

Copy link
Copy Markdown
Author

Not sure why the licence check workflow fails with Error: Error response from the Eclipse Foundation 504

When running the full maven command locally I get this.
The artifact jackson-module-jakarta-xmlbind-annotations is already used in media-jackson with groupId com.fasterxml.jackson module - but here the groupid tools.jackson.module is reported as restricted ...

[INFO] Querying Eclipse Foundation for license data for 500 items.
[INFO] Found 404 items.
[INFO] Querying Eclipse Foundation for license data for 43 items.
[INFO] Found 33 items.
[INFO] Querying ClearlyDefined for license data for 103 items.
[INFO] Found 103 items.
[INFO] License information could not be automatically verified for the following content:

<Mostly helidon, groovy, but also tools.jackson.module/jackson-module-jakarta-xmlbind-annotations/3.0.3

[INFO] This content is either not correctly mapped by the system, or requires review.
[INFO] Summary file was written to: ..../jersey/target/dash/summary
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for jersey 4.0.99-SNAPSHOT:
[INFO] 
[INFO] jersey ............................................. SUCCESS [ 40.982 s]

@senivam

senivam commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

@jolarsen , I wonder how you run the local check? For me, both local and remote runs end in

[INFO] Querying Eclipse Foundation for license data for 500 items.
[ERROR] Error response from the Eclipse Foundation 504

Most probably due to Eclipse's site change.

However, regarding the license, Jackson 3 (same as Jackson 2) is licensed under the Apache 2.0 license. So, if it is the only issue, I would merge it as is.

@jolarsen

jolarsen commented Jan 21, 2026 •

Copy link
Copy Markdown
Author

@senivam I ran the mvn statement from the failing action log - here without the -U option.
Using a M4 Pro - no proxies. Java 25
mvn -V -B -Plicense_check,staging org.eclipse.dash:license-tool-plugin:license-check -DexcludeArtifactIds=bsh,jmh-core,jmh-generator-annprocess,swing-layout -pl '!:version-agnostic'

@jolarsen

jolarsen commented Jan 21, 2026 •

Copy link
Copy Markdown
Author

Here is the list of packages not automatically verified
[INFO] maven/mavencentral/io.helidon.http/helidon-http-http2/4.3.1 [INFO] maven/mavencentral/io.helidon.jersey/helidon-jersey-connector/4.3.1 [INFO] maven/mavencentral/io.helidon.tracing/helidon-tracing/4.3.1 [INFO] maven/mavencentral/io.helidon.webclient/helidon-webclient-api/4.3.1 [INFO] maven/mavencentral/io.helidon.webclient/helidon-webclient-http1/4.3.1 [INFO] maven/mavencentral/io.helidon.webclient/helidon-webclient-http2/4.3.1 [INFO] maven/mavencentral/io.helidon.webclient/helidon-webclient/4.3.1 [INFO] maven/mavencentral/org.apache.groovy/groovy-all/5.0.0-alpha-12 [INFO] maven/mavencentral/org.apache.groovy/groovy-console/5.0.0-alpha-12 [INFO] maven/mavencentral/org.apache.groovy/groovy/5.0.0-alpha-12 [INFO] maven/mavencentral/org.jboss.weld.se/weld-se-core/6.0.3.Final [INFO] maven/mavencentral/tools.jackson.module/jackson-module-jakarta-xmlbind-annotations/3.0.3

@senivam

senivam commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

I've got the check running locally by using JDK 11 instead of JDK 21. Maven command line can be the same.
Looks like the jackson modules are not yet indexed/harvested by clearlydefined DB:

maven/mavencentral/tools.jackson.core/jackson-core/3.0.3, Apache-2.0 AND BSD-2-Clause AND MIT, approved, clearlydefined
maven/mavencentral/tools.jackson.core/jackson-databind/3.0.3, Apache-2.0, approved, clearlydefined
maven/mavencentral/tools.jackson.module/jackson-module-jakarta-xmlbind-annotations/3.0.3, , restricted, clearlydefined

They already have jackson-core and jackson-databind indexed, but not jackson-module-jakarta-xmlbind-annotations. The same applies to the Helidon and Groovy modules you are listing.

@jolarsen

Copy link
Copy Markdown
Author

Running the licence check locally: I first got the same timeout as in the failing workflow. Second attempt was successful.
Reporting helidon and groovy as before, and these Jackson-versions
[INFO] maven/mavencentral/tools.jackson.core/jackson-core/3.0.4 [INFO] maven/mavencentral/tools.jackson.core/jackson-databind/3.0.4 [INFO] maven/mavencentral/tools.jackson.module/jackson-module-jakarta-xmlbind-annotations/3.0.4

@mkarg

mkarg commented Feb 26, 2026

Copy link
Copy Markdown
Member

@jolarsen This PR contains 11 commits. Not all of them look like standalone changes. May we squash everything into a single commit, or do you intentionally want to keep several commits?

@jolarsen

Copy link
Copy Markdown
Author

@mkarg perfectly ok to squash the commits. Would be useful with feedback on the choices (property naming etc), but may be more effective to merge and fix issues as they are discovered.
Jackson 3.1 comes with a small change that will remove the need for copying code - but as Jan commented, there is a history of backwards compatibility...

@atlEdP

atlEdP commented Apr 9, 2026

Copy link
Copy Markdown

Hello everyone 👋 - Just wondering if this will be merged in for the next release? Is there anything else that is required before it can be merged? Thanks!

@jolarsen

Copy link
Copy Markdown
Author

I have updated the PR to Jackson 3.1.1 (including a few changes imported from jackson-jakarta-rs-providers)
Committers: With Jackson 3.1.1, one can in principle avoid repackaging jackson-jakarta-rs-json-provider - with the backwards compatibility risks...

@dmatej dmatej added this to the 4.0.3 milestone Jun 10, 2026
Signed-off-by: Jens-Otto Larsen <jens-otto.larsen@nav.no>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
@dmatej

dmatej commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

I have rebased and squashed this PR - with my recent changes I made some conflicts, and after reading comments here - it would be good to merge it finally.

For a case if I made anything wrong, I have created a backup of the rebased but not squashed branch in my clone as jackson3.backup.

@dmatej
dmatej merged commit fa95781 into eclipse-ee4j:4.x Jun 11, 2026
7 of 8 checks passed
@reneleonhardt

Copy link
Copy Markdown

Thank you so much @jolarsen for not giving up for 5 months, kudos! 🙏

@leonardehrenfried

Copy link
Copy Markdown

I agree, this is much appreciated!

@pjaiprakakamai

Copy link
Copy Markdown

is there a plan to release this on mvn repository ? Package jersey-media-json-jackson3 not yet released in maven central ?

@dmatej

dmatej commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

is there a plan to release this on mvn repository ? Package jersey-media-json-jackson3 not yet released in maven central ?

We had to update the release process for new Maven Central and some other relevant changes, the 4.0.3 was released last week, other branches will slowly follow in following weeks.

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

Successfully merging this pull request may close these issues.

Jersey 4: Support for Jackson 3 ?

10 participants