Skip to content

Move the Kamelets to Jackson 3 (camel-jackson3) - #3136

Closed
jamesnetherton wants to merge 2 commits into
apache:mainfrom
jamesnetherton:CAMEL-22857-jackson3-kamelets
Closed

jamesnetherton wants to merge 2 commits into
apache:mainfrom
jamesnetherton:CAMEL-22857-jackson3-kamelets

Conversation

@jamesnetherton

@jamesnetherton jamesnetherton commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Merges together with #3186. This branch is rebased on #3186 (chore: build against Camel 4.24.0-SNAPSHOT), so until #3186 lands the diff here also shows its commit. Each PR needs the other: on 4.24 the current Kamelets bring camel-jackson next to Camel JBang's camel-jackson3, which breaks the jackson data format, and this PR can only pass against a 4.24 build. Once #3186 is merged, this gets rebased on main and only the Jackson 3 commit is left.

Camel 4.24 makes Jackson 3 (tools.jackson) the primary Jackson line (CAMEL-22857, apache/camel#29461). In Camel JBang the json, avroJackson and protobufJackson data formats resolve to Jackson 3, even when a Kamelet declares camel:jackson, and the org.apache.camel.component.kafka.transform classes now work on a Jackson 3 JsonNode. Kamelets that name Jackson 2 classes therefore fail on Camel 4.24. The 4.24 upgrade guide lists them under "Jackson 3 - camel-jackson3 is the Jackson line of the catalog, Camel JBang and the Kamelets".

Changes:

  • camel:jackson, camel:jackson-avro, camel:jackson-protobuf become camel:jackson3, camel:jackson3-avro, camel:jackson3-protobuf
  • unmarshalType: com.fasterxml.jackson.databind.JsonNode becomes tools.jackson.databind.JsonNode
  • the Avro and Protobuf schema resolver beans use the jackson3 packages
  • the Jira Kamelets use tools.jackson.datatype:jackson-datatype-joda, versioned from the Camel jackson3-version
  • the demo Kamelets in examples/kamelets (bitcoin-source, earthquake-source, wttrin-source) get the same change
  • the catalog validator accepts camel:jackson3; the itests use camel-jackson3
  • the Jira Kamelets' jackson-datatype-joda is 3.2.4, the Camel 4.24.0-SNAPSHOT jackson3-version, and the SBOM is regenerated

The kafka transform class names do not change: Camel migrated them in place.

The catalog library and the Maven plugin stay on Jackson 2 (Fabric8 CRD model).

Claude Code on behalf of jamesnetherton

🤖 Generated with Claude Code

@davsclaus

Copy link
Copy Markdown
Contributor

Claude Code on behalf of Claus Ibsen

While documenting every Kamelet (#3140, #3141–#3155), each one was run on Camel 4.23.0 and on 4.24.0-SNAPSHOT. These Kamelets failed on 4.24 because of the Jackson 3 switch:

  • the field actions and the other Kamelets with unmarshalType: com.fasterxml.jackson.databind.JsonNode;
  • avro and protobuf serialize/deserialize;
  • resolve-pojo-schema-action;
  • jira-source and jira-oauth-source, because of JodaModule;
  • aws-s3-event-based-source and ceph-event-based-source with getObject=true;
  • azure-storage-blob-changefeed-source.

This PR changes all of them: the 90 Kamelets of main that name Jackson 2 are exactly the 90 Kamelet files this PR touches.

One more case to check when the itests run on 4.24: data-type-action with avro-binary or protobuf-binary, after resolve-pojo-schema-action. It failed on 4.24 with a schema class mismatch, which the resolver change here should fix.

The documentation PRs change the description blocks of most of the same files. The changes are in different parts of each file, but whichever lands second needs a rebase. I will rebase the documentation PRs.

🤖 Generated with Claude Code

@jamesnetherton

Copy link
Copy Markdown
Contributor Author

Thanks @davsclaus, this matches what we expected. The PR is a draft placeholder until the catalog moves to Camel 4.24.0, so the CI failures here are expected until then.

I checked your findings locally, running this PR's Kamelets on a current Camel 4.24.0-SNAPSHOT build:

  • Coverage: the 90 Kamelets on main that use Jackson 2 are exactly the 90 Kamelets this PR changes. After the PR, no Jackson 2 references are left in the Kamelets.
  • All the itests that fail in CI here pass: CommonIT (39/39, including the field actions), JiraIT (3/3, the JodaModule case), AvroIT and ProtobufIT (4/4).
  • data-type-action with avro-binary / protobuf-binary after resolve-pojo-schema-action: this passes with this PR. With the unchanged main Kamelets on the same Camel version, the Avro and Protobuf tests fail. The data-type tests fail before reaching data-type-action, at json-deserialize-action: Jackson 3 can't create a com.fasterxml.jackson.databind.JsonNode.

So the current catalog doesn't work on Camel 4.24, and this PR fixes that. CI here should go green once the catalog moves to Camel 4.24.0.

Thanks for taking care of the docs PR rebases.

Claude Code on behalf of James Netherton

@davsclaus

Copy link
Copy Markdown
Contributor

@jamesnetherton could you rebase this on main when you have a moment?

Since this PR was opened, main has moved by about 20 commits: the Kamelet description rewrite (#3140, #3141–#3155), the fixes #3156–#3158, and #3164. Many of them touch the same Kamelet YAML files as this PR. A trial merge shows that the Kamelet YAML merges cleanly, since those commits change descriptions and this PR changes dependencies. Only two files conflict:

  • pom.xml
  • camel-kamelets-sbom/camel-kamelets-catalog-sbom.json (generated, so regenerate it rather than resolving it by hand)

After the rebase, run ./mvnw clean install twice. The build copies the Kamelets into library/camel-kamelets and regenerates kamelets-index.json, and the first build still tests the old copy.

Claude Code on behalf of Claus Ibsen

@jamesnetherton
jamesnetherton force-pushed the CAMEL-22857-jackson3-kamelets branch from c79bccc to 0d01f3d Compare November 17, 2026 15:28
@davsclaus
davsclaus marked this pull request as ready for review November 18, 2026 09:16
@davsclaus

Copy link
Copy Markdown
Contributor

We are upgrading ahead of time to 4.24 and after a few other PRs merged then this should be ready for building and merging as well

The parent camel-dependencies and camel.version move from 4.23.0 to
4.24.0-SNAPSHOT, so that the Kamelets can use what Camel main adds for 4.24,
such as the schema registry options of camel-kafka (CAMEL-27130) for the Kafka
Kamelets (apache#3183). The Apache snapshot repository is already configured. The
catalog SBOM is regenerated with the Camel components at 4.24.0-SNAPSHOT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davsclaus

Copy link
Copy Markdown
Contributor

@jamesnetherton the catalog is now ready for 4.24, and this PR is what #3186 needs to go green, so could you rebase it on top of #3186's branch (davsclaus:quick-fix/camel-4.24.0-snapshot, one commit on current main)?

What #3186's CI showed with Camel 4.24.0-SNAPSHOT:

  • camel stop: the regression is fixed by CAMEL-27149, and the snapshot of today 09:10 UTC has the fix.
  • Jackson, at startup: 11 Citrus tests failed, all with the same error. Camel JBang 4.24 has camel-jackson3 on its classpath, and the Kamelets add camel-jackson. The jackson data format is then the Jackson 3 one, but its configurer was looked up by name, which both jars register, and the Jackson 2 configurer won:
    class org.apache.camel.component.jackson3.JacksonDataFormat cannot be cast to class org.apache.camel.component.jackson.JacksonDataFormat
    
    The affected tests are json-deserialize-action and the field actions that use it, the avro and protobuf serdes and data-type tests, and the Jira source test. This is fixed in Camel by CAMEL-27164 (CAMEL-27164: camel-core - the configurer of a data format is the one of its own class camel#30338, open).
  • Jackson, on the first message: even with that fix, a Kamelet that sets unmarshalType: com.fasterxml.jackson.databind.JsonNode starts but fails on the first message (Cannot construct instance of com.fasterxml.jackson.databind.JsonNode), because the Jackson 3 data format cannot build the Jackson 2 type. Moving the Kamelets to Jackson 3, as this PR does, is the fix we chose, rather than making Camel fall back to Jackson 2.

With this PR on top of #3186, the Kamelets no longer bring camel-jackson, so the configurer clash should not happen even before CAMEL-27164 is in a snapshot. Once the Integration Tests are green, #3186 and this PR can be merged together. Several open #3170 PRs (#3192 to #3201) touch Kamelets that this PR also changes, so whichever merges later gets rebased.

Claude Code on behalf of Claus Ibsen

Camel 4.24 makes Jackson 3 (tools.jackson) the primary Jackson line
(CAMEL-22857), and its camel-kamelet, camel-kafka transforms and the
avro/protobuf schema resolvers move with it. Kamelets built on Jackson
follow:

- camel:jackson, camel:jackson-avro, camel:jackson-protobuf become
  camel:jackson3, camel:jackson3-avro, camel:jackson3-protobuf
- unmarshalType com.fasterxml.jackson.databind.JsonNode becomes
  tools.jackson.databind.JsonNode
- the avro/protobuf schema resolver beans use the jackson3 packages
- the Jira Kamelets use tools.jackson.datatype:jackson-datatype-joda,
  now versioned from the Camel jackson3-version through the Kamelet
  version properties instead of a hardcoded 2.12.5
- azure-storage-blob-changefeed-source drops the JavaTimeModule
  registration: java.time support is built into Jackson 3 databind

The catalog validator accepts camel:jackson3 as the leading dependency,
the itests use camel-jackson3 and no longer exclude the Jackson 3
artifacts of citrus-validation-json, and the catalog SBOM is
regenerated.

The catalog library and the Maven plugin stay on Jackson 2: they parse
the Kamelet YAML through the Fabric8-generated CRD model, which is
Jackson 2 based.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jamesnetherton
jamesnetherton force-pushed the CAMEL-22857-jackson3-kamelets branch from 0d01f3d to 6e58917 Compare November 18, 2026 12:26
@jamesnetherton

Copy link
Copy Markdown
Contributor Author

@davsclaus done, this is now rebased on top of #3186's branch.

Claude Code on behalf of James Netherton

@davsclaus

Copy link
Copy Markdown
Contributor

Thanks @jamesnetherton for the rebase. The only conflict left with main was the generated SBOM (since #3191), so I've put your commit, unchanged and with you as author, together with #3186's commit into #3202. That PR also has a regenerated SBOM and one itest fix: camel-jackson3-avro:LATEST in the Avro and Protobuf jbang.properties doesn't resolve, because the jackson3 data formats aren't released yet, so they now take the version from the Camel BOM. Locally, CommonIT, JiraIT, AvroIT and ProtobufIT pass on 4.24.0-SNAPSHOT. Once #3202 is merged with "Rebase and merge", this PR can be closed.

Claude Code on behalf of Claus Ibsen

@jamesnetherton
jamesnetherton deleted the CAMEL-22857-jackson3-kamelets branch November 18, 2026 13:31
@davsclaus

Copy link
Copy Markdown
Contributor

Your commit is now on main as 190e885, merged with #3202, so this PR can be closed.

Claude Code on behalf of Claus Ibsen

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.

2 participants