Skip to content

Upgrade jackson from 2.22.0 to 3.2.0#758

Open
sabieber wants to merge 1 commit into
mainfrom
feature/sbi/SIRI-1149
Open

Upgrade jackson from 2.22.0 to 3.2.0#758
sabieber wants to merge 1 commit into
mainfrom
feature/sbi/SIRI-1149

Conversation

@sabieber

Copy link
Copy Markdown
Member

BREAKING CHANGES

Upgrades Jackson from 2.22.0 to 3.2.0 across the sirius stack. Jackson 3 uses new Maven coordinates and Java packages — see the official Jackson 3 migration guide and release notes for the complete list of renames and behavioral changes.

What applications using the sirius framework have to change:

  • Rename imports com.fasterxml.jackson.*tools.jackson.* (annotations stay on com.fasterxml.jackson.annotation); drop jackson-datatype-jsr310 and JavaTimeModule registrations (built-in now).
  • Fix the resulting compile errors: unchecked exceptions (JsonProcessingExceptionJacksonException, dead catch (IOException) blocks), method renames (asText()asString() etc., writeFieldName()writeName() etc.), builder-based mapper/generator configuration — see the migration guide for details.

Additional Notes

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices
  • Patch Tasks: Is local execution of Patch Tasks necessary? If so, please also mark the PR with the tag.

Renames all imports from com.fasterxml.jackson to the new tools.jackson packages; annotations remain on the 2.x line. Applies the accompanying API renames: JsonProcessingException becomes the unchecked JacksonException and the text accessors are replaced by their string counterparts (asText() -> asString()).

No structural or behavioral changes are required as the shared object mapper in sirius-kernel retains its Jackson 2 compatible configuration.

Assisted-by: Claude Fable 5
Fixes: SIRI-1149
@sabieber
sabieber requested a review from Copilot July 13, 2026 13:31
@sabieber sabieber added 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code ⬆️ Dependencies Pull requests that update a dependency file 🛠️ Maintenance Translations, Code Cleanup, ... 🤖 AI-Assisted Created with significant assistance of artificial intelligence tools labels Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades this module’s Jackson usage to Jackson 3-compatible packages/APIs (tools.jackson.*) and updates affected JSON node accessors in ES-related code and tests.

Changes:

  • Migrated Jackson imports from com.fasterxml.jackson.* to tools.jackson.* across ES, mixing properties, and utility code.
  • Updated JsonNode string accessor usages in tests and core ES query/entity code (asText()asString()).
  • Simplified Kotlin JSON construction in nightly suggest test to align with updated Jackson APIs.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/kotlin/sirius/db/es/SuggestNightlyTest.kt Removes Jackson ObjectNode import and updates JSON builder call for Jackson 3 compatibility.
src/test/kotlin/sirius/db/es/LowLevelClientTest.kt Updates JsonNode string accessor to asString() in assertions.
src/test/kotlin/sirius/db/es/ElasticQueryTest.kt Updates aggregation bucket key extraction to asString().
src/main/java/sirius/db/util/Tensors.java Switches ArrayNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringMapProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringLocalDateTimeMapProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringListProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringIntMapProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/StringBooleanMapProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/SQLEntityRefProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/NestedListProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/MongoRefProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/LongProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/LocalDateTimeProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/LocalDateProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/IntegerProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/EnumProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/ElasticRefProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/BooleanProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/BaseEntityRefListProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/mixing/properties/AmountProperty.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/types/DenseVectorProperty.java Switches ArrayNode/ObjectNode imports to tools.jackson.*.
src/main/java/sirius/db/es/suggest/TextPartSuggestion.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/suggest/TermSuggestion.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/suggest/SuggestionResult.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/suggest/SuggestionQuery.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/suggest/SuggesterBuilder.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/SortBuilder.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/SettingsCustomizer.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/RequestBuilder.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/NearestNeighborsSearch.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/LowLevelClient.java Switches ArrayNode/ObjectNode imports to tools.jackson.*.
src/main/java/sirius/db/es/IndexMappings.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/FunctionScoreBuilder.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/ESPropertyInfo.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/ElasticQuery.java Switches Jackson core/databind imports to tools.jackson.* and updates asString() usage.
src/main/java/sirius/db/es/ElasticMetricsProvider.java Switches Jackson core/databind imports to tools.jackson.*.
src/main/java/sirius/db/es/ElasticEntity.java Switches Jackson databind imports to tools.jackson.* and updates asString() usage.
src/main/java/sirius/db/es/Elastic.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/constraints/NestedQuery.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/constraints/ElasticFilterFactory.java Switches ArrayNode/ObjectNode imports to tools.jackson.*.
src/main/java/sirius/db/es/constraints/ElasticCSVFilter.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/constraints/ElasticConstraint.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/constraints/BoolQueryBuilder.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/BulkResult.java Switches ArrayNode/ObjectNode imports to tools.jackson.*.
src/main/java/sirius/db/es/BulkContext.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/Bucket.java Switches ObjectNode import to tools.jackson.*.
src/main/java/sirius/db/es/AggregationResult.java Switches Jackson databind imports to tools.jackson.*.
src/main/java/sirius/db/es/AggregationBuilder.java Switches Jackson databind imports to tools.jackson.*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 AI-Assisted Created with significant assistance of artificial intelligence tools 💣 BREAKING CHANGE Contains non-backwards compatible changes to public methods or changes the behavior of existing code ⬆️ Dependencies Pull requests that update a dependency file 🛠️ Maintenance Translations, Code Cleanup, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants