Skip to content

Conversation

@jolarsen
Copy link

@jolarsen jolarsen commented Jan 11, 2026

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

Signed-off-by: Jens-Otto Larsen <[email protected]>
@reneleonhardt
Copy link

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
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

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
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

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

@senivam
Copy link
Contributor

senivam commented Jan 12, 2026

@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.

Signed-off-by: Maxim Nesen <[email protected]>
@senivam
Copy link
Contributor

senivam commented Jan 12, 2026

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
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
Copy link
Contributor

senivam commented Jan 12, 2026

@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
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
Copy link
Contributor

senivam commented Jan 12, 2026

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

@jolarsen
Copy link
Author

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

@senivam
Copy link
Contributor

senivam commented Jan 12, 2026

Finally it passed fine

@jolarsen
Copy link
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
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 ?

4 participants