CAMEL-22857: Fix issues found during Jackson 3 migration review#21921
Closed
gnodet wants to merge 9 commits intoapache:mainfrom
Closed
CAMEL-22857: Fix issues found during Jackson 3 migration review#21921gnodet wants to merge 9 commits intoapache:mainfrom
gnodet wants to merge 9 commits intoapache:mainfrom
Conversation
…ge, remove unused properties
Replace the explicit jackson-annotations managed dependency with a Jackson 2 BOM import. This ensures all Jackson 2 artifacts (annotations, core, databind) stay coherent at the same version. Previously, only jackson-annotations was managed at 2.20 while jackson-databind was unmanaged, causing langchain4j (which transitively brings jackson-databind 2.21.1) to fail with NoClassDefFoundError for JsonSerializeAs (introduced in annotations 2.21). Also bumps jackson2-version from 2.20.2 to 2.21.1 to match the version used by transitive dependencies like langchain4j.
Replace ${jackson2-annotations-version} with ${jackson2-version} in
camel-jbang-mcp since the property was removed in favour of the
Jackson 2 BOM import.
The Jackson 2 BOM must be imported before the Jackson 3 BOM in
dependencyManagement. Maven resolves managed versions from the first
BOM that declares them. The Jackson 3 BOM pins
com.fasterxml.jackson.core:jackson-annotations to 2.20 for backward
compatibility, but transitive dependencies (langchain4j, twilio)
require 2.21.x. Importing the Jackson 2 BOM first ensures all Jackson
2 artifacts resolve at ${jackson2-version} (2.21.1).
…ang-mcp jackson-annotations uses a different versioning scheme since 2.20 (no patch version), so jackson-annotations:2.21.1 does not exist. Remove the explicit version so the Jackson 2 BOM manages it correctly to 2.21. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n3-avro Remove the local Jackson 3 BOM import from camel-jackson3-avro. The parent POM already imports both Jackson 2 and Jackson 3 BOMs in the correct order (Jackson 2 first). The local import was overriding jackson-annotations to 2.20 (from Jackson 3 BOM) while jackson-databind remained at 2.21.1 (from parent's Jackson 2 BOM). Since jackson-databind 2.21.1 requires jackson-annotations 2.21 (for JsonSerializeAs), this caused NoClassDefFoundError at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Salesforce JsonUtils: restore WRITE_DATES_AS_TIMESTAMPS and ADJUST_DATES_TO_CONTEXT_TIME_ZONE (moved to DateTimeFeature in Jackson 3) - ServiceNow: restore custom date/time format serializers using dateFormat/timeFormat/dateTimeFormat config properties - CBOR: fix registry lookup to find ObjectMapper (not TokenStreamFactory), and consolidate repeated rebuild().build() into single call - Micrometer: remove dead IOException throws and try-catch from serializer methods (Jackson 3 uses unchecked exceptions) - Salesforce: restore exception handling in AbstractDTOBase.toString(), LoginConfigHelper, StreamingApiConsumer, DefaultBulkApiV2Client Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
Author
|
Pushed fixes directly to #21800 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up fixes for the Jackson 3 migration (#21800). These address issues found during code review.
Fixes included:
JsonUtils: RestoreWRITE_DATES_AS_TIMESTAMPSandADJUST_DATES_TO_CONTEXT_TIME_ZONEusing Jackson 3'sDateTimeFeature— without this, dates serialize as numeric timestampsServiceNowConfiguration: Restore custom date/time format serializers using the user'sdateFormat/timeFormat/dateTimeFormatconfig properties, which became dead code after migrationCBORDataFormat: Fix registry lookup to findObjectMapperinstances (notTokenStreamFactory) so users with registeredCBORMapperare still auto-discovered; consolidate repeatedrebuild().build()into single callMicrometerModule: Remove deadthrows IOExceptionand try-catch from serializer methods (Jackson 3 uses unchecked exceptions)AbstractDTOBase.toString(),LoginConfigHelper,StreamingApiConsumer, andDefaultBulkApiV2Client— Jackson 3's uncheckedJacksonExceptionwas causing lost error handlingContext
See review comment: #21800 (comment)
This PR should be merged after #21800.