nrknithin opened a new issue, #6702: URL: https://github.com/apache/incubator-kie-drools/issues/6702
## Context — why this is a follow-up The Spring Boot 4 upgrade (PRs linked at the bottom) moved everything in the KIE stack to new majors **except Jackson**: | Component | Before | After | |---|---|---| | Spring Boot | 3.5.12 | 4.0.5 | | Spring Framework | 6.2.x | 7.0.6 | | Spring Cloud | 2024.x | 2025.1.1 | | Hibernate | 6.x | 7.1.18.Final | | **Jackson** | **2.21.2** | **2.21.2 (unchanged)** | Jackson stayed at 2.x because `kogito-events-core` is shared with Quarkus, and Quarkus is still on Jackson 2 (Quarkus 3.33 ships `jackson-bom 2.21.1`). Migrating one side forces the other. This issue tracks the deferred Jackson 3 migration as a single coordinated cleanup once Quarkus and the shared code path are both ready. ## Background The KIE stack currently uses Jackson 2 (`com.fasterxml.jackson.databind.*`) across **both** the Quarkus and Spring Boot sides. The shared `kogito-events-core` module — specifically `JacksonEventDataUnmarshaller` and the other marshallers in `org.kie.kogito.event.impl.*` — autowires `com.fasterxml.jackson.databind.ObjectMapper` (Jackson 2), and this class is consumed by both Quarkus and Spring Boot apps. Migrating one side forces the other. Spring Boot 4 no longer auto-configures Jackson 2 by default — its default auto-configuration provides Jackson 3 (`tools.jackson.databind.*`). The Jackson 2 `MappingJackson2HttpMessageConverter` is no longer registered automatically, and the auto-configured `ObjectMapper` bean is the Jackson 3 type. To keep the Spring Boot side working with the existing Jackson 2 code paths, the SB 4 upgrade added per-repo Jackson 2 helpers (listed below). Quarkus 3.33 still ships `jackson-bom 2.21.1` (Jackson 2). Until **both** Quarkus and the shared `kogito-events-core` move to Jackson 3, the Spring Boot-side helpers stay. This issue tracks the full list of Jackson 2 helpers added during the Spring Boot 4 upgrade so they can be removed in lock-step when the migration becomes feasible. ## What needs to happen 1. `kogito-events-core`'s `JacksonEventDataUnmarshaller` (and any other shared class autowiring `com.fasterxml.jackson.databind.ObjectMapper`) is switched to `tools.jackson.databind.ObjectMapper`. 2. Both the Quarkus side (via Quarkus's `tools.jackson` support) and the Spring Boot side (via Spring Boot 4's default auto-configuration) provide a Jackson 3 `ObjectMapper`, so the autowiring resolves on both sides. 3. Every per-repo Jackson 2 helper listed below is removed. ## Affected sites (to remove in lock-step) | Repo | File | What it provides today | |---|---|---| | drools | `drools-model/drools-model-codegen/src/main/resources/class-templates/ruleunits/RestObjectMapperSpringTemplate.java` | Jackson 2 deserialiser module + `MappingJackson2HttpMessageConverter` `@Bean` (with `canWrite(String) → false` for DMN's pre-serialized JSON) | | kogito-runtimes | `kogito-codegen-modules/kogito-codegen-core/src/main/resources/class-templates/config/GlobalObjectMapperSpringTemplate.java` | Jackson 2 `@Bean ObjectMapper` (codegen template — emitted into every Spring Boot kogito app) | | kogito-runtimes | `springboot/addons/jobs/src/main/java/org/kie/kogito/jobs/management/springboot/AddonObjectMapperBuilderCustomizer.java` | `BeanPostProcessor` that registers cloud-events descriptors on the Jackson 2 `ObjectMapper` | | kogito-runtimes | `springboot/addons/jobs/src/test/java/org/kie/kogito/jobs/management/springboot/AddonObjectMapperBuilderCustomizerTest.java` | Test for the above | | kogito-runtimes | `springboot/addons/kubernetes/src/test/java/org/kie/kogito/addons/springboot/k8s/App.java` | Jackson 2 `@Bean ObjectMapper` (test fixture; production apps get this from the codegen `GlobalObjectMapper`) | | kogito-apps | `data-audit/kogito-addons-data-audit-springboot/src/main/java/org/kie/kogito/app/audit/springboot/SpringbootAuditDataConfiguration.java` | Jackson 2 `@Bean ObjectMapper` + `MappingJackson2HttpMessageConverter` (note: the Hibernate `BeanPostProcessor` in the same file is unrelated and stays) | | kogito-apps | `data-index/data-index-springboot/data-index-storage-jpa-springboot/src/test/java/org/kie/kogito/index/jpa/springboot/KogitoSpringBootApplication.java` | Jackson 2 `@Bean ObjectMapper` (data-index test fixture) | | kogito-examples | `kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/JacksonHttpMessageConverterConfig.java` | `MappingJackson2HttpMessageConverter` `@Bean` (onboarding-springboot has no rule units so doesn't get the codegen converter) | ## Act on this issue when… …Quarkus ships a release that uses `tools.jackson.databind.*` **and** `kogito-events-core`'s shared marshaller classes have been switched to the Jackson 3 type. Until both prerequisites land, the Jackson 2 helpers above are required. ## Related PRs (Spring Boot 4 upgrade) - drools: https://github.com/apache/incubator-kie-drools/pull/6686 - optaplanner: https://github.com/apache/incubator-kie-optaplanner/pull/3221 - kogito-runtimes: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4270 - kogito-apps: https://github.com/apache/incubator-kie-kogito-apps/pull/2331 - kogito-examples: https://github.com/apache/incubator-kie-kogito-examples/pull/2210 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
