Skip to content

Upgrade to Camel 4.22.0 - #753

Open
jbonofre wants to merge 17 commits into
apache:mainfrom
jbonofre:camel-4.22.0
Open

jbonofre wants to merge 17 commits into
apache:mainfrom
jbonofre:camel-4.22.0

Conversation

@jbonofre

@jbonofre jbonofre commented Sep 6, 2026

Copy link
Copy Markdown
Member

Upgrades the bundled Apache Camel version from 4.18.1 to 4.22.0 using the tooling/camel-upgrade tool, plus follow-up fixes required by that upgrade:

  • Regenerate wrappers/features/catalog for Camel 4.22.0.

  • Set the squareup-okhttp-version property (needed by the new Camel version).

  • Remove the core/camel-cloud module: Camel 4.22.0 dropped camel-cloud upstream.

  • Finish the camel-cloud removal in camel-blueprint: drop the now-unresolvable ServiceCallConfigurationDefinition/ServiceCallDefinition references in CamelContextFactoryBean and BlueprintModelJAXBContextFactory, the stale org.apache.camel.model.cloud OSGi import in camel-xml-jaxb, and the two blueprint tests exercising the removed feature.

  • Migrate camel-cxf-blueprint to the CXF 4.2 logging feature: the upgrade also moves CXF from 4.1.7 to 4.2.3, and CXF 4.2 removed the long-deprecated org.apache.cxf.feature.LoggingFeature from cxf-core. Both call sites (the RsServerBlueprintBean field and the <cxf:logging> parser in CXFAPINamespaceHandler) now use org.apache.cxf.ext.logging.LoggingFeature. That class has no LoggingFeature(int) constructor, so the size limit is applied via setLimit(); leaving it unset keeps CXF's own default, matching the previous no-arg behaviour. No new dependency is needed — camel-cxf-all already shades cxf-rt-features-logging, and the camel-cxf feature already installs that bundle ahead of camel-cxf-blueprint.

  • Bump camel-osgi-cxf-version from [4.1,4.2) to [4.2,4.3) so the org.apache.cxf.* OSGi imports generated for the four camel-cxf bundles resolve against CXF 4.2 at runtime.

  • Fix camel-spring-ai wrapping: Camel 4.22.0 does not publish a single camel-spring-ai jar (the generated wrapper depended on a nonexistent org.apache.camel:camel-spring-ai artifact, which broke the Maven build). Upstream splits it into camel-spring-ai-chat, camel-spring-ai-embeddings, camel-spring-ai-image and camel-spring-ai-vector-store (camel-spring-ai-tools was discontinued after 4.21.0 and merged into chat). Each is now wrapped as its own bundle module under camel-spring-parent, with matching feature entries in camel-features.xml.

  • Add org.jspecify:jspecify as a bundle dependency of the camel-core feature: camel-api in 4.22.0 now Import-Packages org.jspecify.annotations (nullability annotations), which broke OSGi resolution for every feature depending on camel-core (caught by the karaf-maven-plugin verify goal in the features module).

  • Fix a stale ${jdk-version} property reference in features/pom.xml's karaf-maven-plugin <javase> configuration: the root pom.xml renamed this property to javaVersion in a prior, unrelated change, but features/pom.xml was never updated to match. The unresolved reference silently fell back to a default JDK system-package list missing jdk.jfr, which camel-console now requires in Camel 4.22.0.

  • Mark jdk.jfr/jdk.jfr.consumer as optional OSGi imports in camel-console: the ${jdk-version} property fix above was not sufficient on its own — jdk.jfr is a JDK-specific module, not part of the formal JavaSE profile package list karaf-maven-plugin derives from <javase>, so it is still not exported by the system bundle even with the property corrected. Camel 4.22.0's new JfrMemoryLeakDevConsole in camel-console references jdk.jfr/jdk.jfr.consumer, and the module's wildcard camel.osgi.import turned that into a mandatory Import-Package, breaking OSGi resolution for every feature depending on camel-core. Fixed by marking both packages resolution:=optional, matching the existing precedent in camel-core-model/pom.xml for the same package. Verified locally: rebuilding camel-console confirms the manifest now carries jdk.jfr;resolution:=optional (previously mandatory), and re-running the features module's karaf-maven-plugin verify goal confirms camel, camel-core, camel-core+shell and camel-blueprint no longer fail (they were all failing in the CI run against the prior commit).

  • Bump jackson2-annotations-version from 2.20 to 2.22: the upgrade bumped jackson2-version from 2.20.1 to 2.22.1 but left jackson2-annotations-version at 2.20 (the correct pairing for the prior 2.20.1) since jackson-annotations doesn't publish patch releases matching jackson-core/jackson-databind's cadence. This was masked by the jdk.jfr failure above (which stopped OSGi resolution before reaching it); once camel-core resolves, features that declare a dependency on the jackson feature (e.g. camel-zookeeper-master, via curator/guava) failed instead, needing com.fasterxml.jackson.annotation >=2.22.0. Verified locally: re-running the features module's karaf-maven-plugin verify goal shows camel-zookeeper-master no longer failing on this requirement.

  • Restore 23 third-party version properties in pom.xml that the Camel 4.22.0 upgrade dropped from its wholesale property regeneration but that camel-features.xml still references for wrapped bundles (cglib, xpp3, netty-reactive-streams, vavr, nimbusds content-type/lang-tag/oauth2-oidc-sdk, async-http-client, minidns, checker-qual, neo4j-bolt-connection, parsson, snakeyaml-engine for kubernetes, microprofile-fault-tolerance-api, commons-math3). Each value was verified against the actual Camel 4.22.0 dependency tree (mvn dependency:tree per affected component) rather than restored blindly, so several picked up real version bumps (e.g. minidns-core 0.3.4 → 1.0.5, async-http-client 3.0.3 → 3.0.9, checker-qual 3.53.1 → 3.42.0). The unresolved ${...} placeholders were breaking Karaf feature resolution for camel-xmpp, camel-zendesk, camel-cxf and, transitively, every feature that depends on them.

  • Point the docling, langchain4j-hugging-face/langchain4j-community-dashscope and google-auth-library bundles in camel-features.xml at the properties the upgrade's regeneration had already renamed them to (docling-java-version, langchain4j-beta-version, langchain4j-community-version, google-auth-library-oauth2-http-version) instead of the old, now-removed property names.

  • Replace the obsolete com.dylibso.chicory bundles in camel-wasm with run.endive, which Camel 4.22.0 now uses for its WASM runtime (confirmed via camel-wasm's actual dependency tree; pom.xml already carried an endive-version property from the regeneration, unused until now).

  • Drop the dead reactor-netty-incubator-quic bundle from camel-stitch: QUIC support graduated into Netty core (as already noted by a leftover comment in pom.xml) and is already provided via netty-codec-http3/netty-codec-classes-quic in the same feature.

  • Add the missing smack-xmlparser/smack-xmlparser-stax, smack-java8, smack-resolver-javax, smack-sasl-javax and smack-streammanagement bundles to camel-xmpp: smack-core 4.4.8 requires them but they were never declared, a pre-existing gap masked until the minidns/xpp3 placeholders above were fixed and Karaf's resolver could get far enough to see it.

    Verified locally: rebuilding the features module offline confirms 18 features that were failing in CI (camel-docling, camel-elasticsearch, camel-fhir, camel-grpc, camel-kubernetes, camel-langchain4j-chat/embeddings/tokenizer, camel-microprofile-fault-tolerance, camel-neo4j, camel-plc4x, camel-resilience4j/micrometer, camel-stitch, camel-wasm, camel-zendesk, camel-azure-schema-registry, camel-mail-microsoft-oauth) now resolve cleanly, with no new regressions versus the original CI failure set. camel-cxf and camel-xmpp still fail locally, but for separate, pre-existing reasons unrelated to this change (a Karaf-bundled spring feature version mismatch cascading from camel-spring, and a smack-core import on the JDK-internal sun.security.pkcs11 package, respectively) — not addressed here.

jbonofre and others added 17 commits September 6, 2026 18:58
Camel 4.22.0 removed org.apache.camel.model.cloud entirely. Remove the
remaining ServiceCall references left over from the camel-cloud
removal: the defaultServiceCallConfiguration/serviceCallConfigurations
fields and accessors in CamelContextFactoryBean, the ServiceCallDefinition
registration in BlueprintModelJAXBContextFactory, the now-unresolvable
org.apache.camel.model.cloud OSGi import in camel-xml-jaxb, and the two
blueprint tests exercising the removed feature.
CXF 4.2 removed the long-deprecated org.apache.cxf.feature.LoggingFeature
from cxf-core, which broke the camel-cxf-blueprint build once the CXF
version moved from 4.1.7 to 4.2.3.

Switch both call sites to the replacement
org.apache.cxf.ext.logging.LoggingFeature: the RsServerBlueprintBean
field and the <cxf:logging> parser in CXFAPINamespaceHandler. The new
class has no LoggingFeature(int) constructor, so the size limit is now
applied through setLimit(); leaving it unset keeps CXF's own default,
matching the previous no-arg behaviour. The @SuppressWarnings on
CXFAPINamespaceHandler.parse() existed only for the removed class and
is dropped.

No new dependency is needed: camel-cxf-all already shades
cxf-rt-features-logging, and the camel-cxf feature already installs that
bundle ahead of camel-cxf-blueprint.

Also bump camel-osgi-cxf-version from [4.1,4.2) to [4.2,4.3) so the
org.apache.cxf.* OSGi imports generated for the four camel-cxf bundles
resolve against CXF 4.2 at runtime.
Camel 4.22.0 does not publish a single camel-spring-ai jar; it is split
into camel-spring-ai-chat, camel-spring-ai-embeddings,
camel-spring-ai-image and camel-spring-ai-vector-store (camel-spring-ai-tools
was discontinued after 4.21.0). Wrap each of these as its own bundle
module under camel-spring-parent, matching the existing sibling modules,
and update the feature descriptor accordingly.
camel-api in Camel 4.22.0 now Import-Packages org.jspecify.annotations
(nullability annotations used on the public API surface), which no
bundle in the feature set exported. This broke OSGi resolution for
every feature depending on camel-core (e.g. camel-zookeeper-master via
camel-management-api), caught by the karaf-maven-plugin verify goal in
the features module. Add org.jspecify:jspecify as a dependency bundle
of camel-core, matching how it is already added to individual features
that need it directly (camel-azure-eventhubs, camel-reactor, etc).
The root pom.xml renamed jdk-version to javaVersion in the "Upgrade to
Apache POM 37" change, but features/pom.xml's karaf-maven-plugin
<javase> configuration was never updated to match. The unresolved
${jdk-version} reference was silently ignored, so the verify goal fell
back to a default JDK system-package list that does not include
jdk.jfr, which camel-console now requires in Camel 4.22.0. Point
<javase> at the correct javaVersion property so verify resolves
against JDK 17's actual system packages.
Camel 4.22.0 added JfrMemoryLeakDevConsole to camel-console, which
references jdk.jfr/jdk.jfr.consumer (Java Flight Recorder). With the
wildcard `camel.osgi.import`, bnd generated a mandatory
Import-Package for both packages, which broke OSGi resolution for
every feature depending on camel-core (caught by the
karaf-maven-plugin verify goal in the features module):

  Unable to resolve camel-console/4.22.0.SNAPSHOT: missing requirement
  osgi.wiring.package; filter:="(osgi.wiring.package=jdk.jfr)"

The previous fix (correcting the stale ${jdk-version} -> javaVersion
property reference in features/pom.xml) was not sufficient on its
own: jdk.jfr is a JDK-specific module, not part of the formal JavaSE
profile package list karaf-maven-plugin derives from <javase>, so it
is still not exported by the system bundle even with the property
fixed.

Mark both packages resolution:=optional instead, matching the
existing precedent in camel-core-model/pom.xml for the same package.
The Camel 4.22.0 upgrade bumped jackson2-version from 2.20.1 to
2.22.1 but left jackson2-annotations-version at 2.20 (the correct
pairing for the prior 2.20.1), since jackson-annotations does not
publish patch releases matching jackson-core/jackson-databind's
cadence. This was masked in CI by the jdk.jfr failure (fixed in the
previous commit), which stopped OSGi resolution before it reached
this: once camel-core resolves, features that declare a dependency on
the jackson feature (e.g. camel-zookeeper-master, via curator/guava)
fail instead, needing:

  missing requirement [camel-zookeeper-master/4.22.0.SNAPSHOT]
  osgi.wiring.package; filter:="(&(osgi.wiring.package=
  com.fasterxml.jackson.annotation)(version>=2.22.0)(!(version>=3.0.0)))"

jackson-annotations 2.22 (Maven Central, no 2.22.1 patch release
exists for this artifact) satisfies that range. Verified locally:
re-running the features module's karaf-maven-plugin verify goal shows
camel-zookeeper-master (and the rest of the original camel-core/
camel-zookeeper-master chain from the CI failure) no longer failing
on this requirement.
…features

The Camel 4.22.0 upgrade regenerated pom.xml's third-party version
properties from Camel's own POM, dropping 23 camel-karaf-only
properties that camel-features.xml still references for wrapped
third-party bundles. This left literal ${...} placeholders in the
generated feature descriptors, breaking Karaf feature resolution for
camel-xmpp, camel-zendesk, camel-cxf and many other features that
transitively depend on them.

- Restore properties that are camel-karaf-only pins for optional/OSGi
  best-effort bundles (cglib, xpp3, netty-reactive-streams, vavr,
  nimbusds content-type/lang-tag/oauth2-oidc-sdk), using their
  previous values, and for genuine transitive dependencies whose
  resolved version changed (async-http-client, minidns, checker-qual
  via guava, neo4j-bolt-connection, parsson, snakeyaml-engine for
  kubernetes), using the version actually resolved for Camel 4.22.0.
- Point docling, langchain4j-hugging-face/community-dashscope and
  google-auth-library bundles at the properties the upgrade already
  renamed them to (docling-java-version, langchain4j-beta-version,
  langchain4j-community-version, google-auth-library-oauth2-http-version)
  instead of the old removed names.
- Replace the obsolete com.dylibso.chicory bundles in camel-wasm with
  run.endive, which Camel 4.22.0 now uses for its WASM runtime.
- Drop the dead reactor-netty-incubator-quic bundle from camel-stitch;
  QUIC support graduated into Netty core and is already provided via
  netty-codec-http3/netty-codec-classes-quic in the same feature.
- Add the missing smack-xmlparser/-stax, smack-java8,
  smack-resolver-javax, smack-sasl-javax and smack-streammanagement
  bundles to camel-xmpp; smack-core 4.4.8 requires them but they were
  never declared, a pre-existing gap masked until the minidns/xpp3
  placeholders above were fixed.

Verified offline against the actual Camel 4.22.0 dependency trees
(mvn dependency:tree per component) rather than restoring values
blindly. Rebuilding the features module locally confirms 18 features
that failed in CI now resolve cleanly, with no new regressions versus
the original failure set.
…ange

smack-core 4.4.8 mandatorily imports the JDK-internal
sun.security.pkcs11 package with no version/optional qualifier, which
the system bundle does not export. Wrap smack-core to mark that one
import optional, matching the existing wss4j precedent in the same
feature file. Verified locally: camel-xmpp now resolves.

camel-osgi-spring-version was still [6.2,6.3), left over from before
the Camel 4.22.0 upgrade bumped spring-version to 7.0.8. camel-karaf
already carries its own hand-wrapped Spring 7.x OSGi feature
(features/src/main/feature/spring-features.xml, built during a prior
Spring upgrade), but the stale version range excluded both that and
Karaf's own bundled Spring 6.1.x feature, so camel-spring and every
feature depending on it (directly or transitively: AWS, Azure,
Google, Debezium, JMS, all spring-* features, camel-cxf, ...) failed
to resolve. Bumping the range to [7.0,7.1) to match spring-version
fixes it without needing any new OSGi wrapping work.

Verified locally: rebuilding the features module offline shows 19
more features resolving cleanly (camel-spring and everything that was
only blocked by it), with no new regressions.
…jackson3, opentelemetry2, ai-tool, and jactl

Continuing the Camel 4.22.0 OSGi resolution cleanup, verified against
actual dependency trees for each component (mvn dependency:tree,
manifest inspection for OSGi-readiness):

- camel-aws-common (cascades to camel-aws-bedrock and all camel-aws2-*
  features): AWS SDK v2 2.50.2 replaced apache-client with
  apache5-client; add it plus the newly-required http-auth-aws-eventstream,
  annotations, utils-lite, software.amazon.eventstream, and
  httpcore5-h2 bundles.
- camel-azure-common: 11 azure-* features imported
  org.apache.camel.component.azure.common but never declared a
  dependency on the camel-azure-common feature that provides it.
- camel-google-common: add the missing google-oauth-client,
  google-api-client and google-http-client bundles (all real
  transitive deps; camel-google-common's own compiled code imports
  their packages directly but no feature bundle provided them).
- New "jackson3" base feature (mirroring the existing "jackson" one)
  plus camel-osgi-jackson3-version, wiring up
  camel-jackson3/-avro/-protobuf/-xml, which previously declared only
  the camel-karaf wrapper bundle and nothing else.
- camel-opentelemetry2: OtlpProtobufSpanData genuinely uses
  com.google.protobuf.ByteString and io.opentelemetry.proto classes at
  runtime; add opentelemetry-proto, protobuf-java, and the missing
  opentelemetry-common/opentelemetry-sdk-metrics bundles.
- camel-ai-tool feature dependency was missing from
  camel-langchain4j-agent, camel-mcp-server and camel-spring-ai-chat.
- camel-jactl: add the io.jactl bundle (previously declared nothing
  but the wrapper itself).
- camel-jfr: mark jdk.jfr/jdk.jfr.consumer optional in its own
  camel.osgi.import, same precedent as camel-console.
- camel-salesforce/camel-pinecone: grpc-protobuf pulls protobuf-java
  3.25.x, not the project's main 4.x protobuf-version; add a
  protobuf3-version property for that.

Also includes two component-json/factory regenerations
(camel-directvm, camel-vm) that were never refreshed when Camel
4.22.0 added Endpoint.endpointIdentityPropertyNames() and the SEDA/VM
virtualThreadPerTask option - caught incidentally while rebuilding the
full reactor under JDK 17 to get a clean verification baseline.

Verified locally: rebuilding the features module offline shows the
failure count dropping from 114 to 63, with zero regressions against
the prior run.
… jira, groovy, dropbox, pqc, jsoup, jline, jakarta.ws.rs)

Continuing the same dependency-tree-verified cleanup:

- camel-a2a, camel-camunda: missing <feature>jackson</feature>
  dependency (their compiled code needs com.fasterxml.jackson.annotation
  but no bundle in the feature provided it).
- camel-jira: sal-api bundle used the wrong property (${sal-api-version}
  = 5.1.4, an unrelated leftover) instead of ${jira-sal-api-version}
  = 7.2.1, which is what jira-rest-java-client-core actually needs.
- camel-groovy: Groovy 5.x split json/xml/dateutil into separate
  artifacts; add groovy-json, groovy-xml, groovy-dateutil alongside
  the existing groovy bundle.
- camel-dropbox: dropbox-core-sdk's own OSGi manifest wants
  jakarta.servlet.http [5.0,6.0), narrower than the jakarta-servlet
  [6,7) camel-dropbox's own code needs; add both.
- camel-pqc: the wrapper bundle's own manifest (confirmed by rebuilding
  it - an earlier .m2 copy was stale) mandatorily imports several
  com.azure.* packages from org.apache.camel.component.pqc.lifecycle
  (Azure Key Vault-backed key storage); add the azure feature and
  azure-security-keyvault-secrets bundle.
- camel-jsoup: add the missing org.jsoup bundle.
- camel-diagram, camel-shell: add the missing org.jline bundle.
- camel-bonita, camel-servicenow, camel-wordpress: these compile
  directly against jakarta.ws.rs-api 4.0.0 (Jakarta EE 11), not the
  3.1.0 the rest of the project pins; add a new
  jakarta-ws-rs-api2-version property and bundle rather than touching
  the shared 3.1.x jakarta-ws-rs base feature other components rely on.
- camel-google-common: needed two more real transitive bundles
  (google-http-client, opencensus-api/contrib-http-util) beyond the
  google-oauth-client/google-api-client fix from the previous commit.

Also confirms a pattern worth flagging: some earlier "missing
requirement" errors turned out to be stale locally-cached
camel-karaf wrapper jars (built before a pom.xml OSGi-import fix, e.g.
camel-pqc), not real bugs - rebuilding the specific module cleared
them without any feature-XML change.
…y, jsonpath, aws2-eventbridge, graphql, clickhouse, huggingface, watsonx-data, shiro, spring-rabbitmq)

Continuing the dependency-tree-verified cleanup:

- camel-micrometer-prometheus: prometheus-metrics-config's own manifest
  mandatorily imports the JDK-internal-shaped javax.annotation package
  with no matching provider anywhere; mark it optional the same way
  other third-party overrides in this file do.
- camel-opentelemetry, camel-opentelemetry-metrics: add the missing
  opentelemetry-common bundle (same gap fixed for opentelemetry2
  previously); it needs the Aries SPI-fly serviceloader-processor
  extender, so mark it SPI-Consumer and add the spifly prerequisite,
  matching the existing camel-bean-validator precedent.
- camel-jsonpath, camel-geocoder: json-path 3.0.0 is the Jackson
  3.x-based release line and needs the jackson3 base feature, not
  jackson2.
- camel-aws2-eventbridge: add the missing sqs bundle (eventbridge's
  own compiled code references it for the SQS event pattern).
- camel-graphql: reference the full camel-http feature instead of just
  camel-http-base; its own compiled code imports
  org.apache.camel.component.http directly.
- camel-clickhouse, camel-huggingface, camel-ibm-watsonx-data: wrap
  their actual (previously undeclared) third-party SDKs - ClickHouse
  Java client, DJL/tokenizers, and the WatsonX Data SDK's okhttp/
  kotlin/rxjava2/sdk-core stack - verified via dependency:tree.
- camel-shiro, camel-spring-rabbitmq: two more ${auto-detect-version}
  placeholders that couldn't resolve because the package (jakarta.
  annotation-api, spring-retry) isn't actually a transitive Maven
  dependency of the wrapped component; point them at concrete
  properties instead (jakarta-annotation-api-version, and a new
  spring-retry-version).
- camel-jira: (fixed in previous batch, verified again here) confirmed
  distinguishing this from ~5 features (camel-tika, camel-undertow,
  camel-weaviate, camel-quickfix) whose "download failed" errors
  turned out to be local pax-url/offline-cache flakiness, not real
  bugs - each artifact resolves fine via plain `mvn dependency:tree`.

Deferred (would each require wrapping 10-25+ additional third-party
bundles in an isolated, often version-conflicting dependency universe):
camel-pinecone, camel-azure-functions (separate azure-resourcemanager
SDK stack), camel-datasonnet (scala/datasonnet-mapper stack), and the
camel-spring-ai-embeddings/-image/-vector-store + MCP SDK family
(langchain4j-agent, mcp-server, openai, spring-ai-chat).
…w, weaviate, spring-rabbitmq

- camel-tika: juniversalchardet was wrapped under the wrong groupId
  (com.github.albfernandez, which never published it); the artifact is
  published as com.googlecode.juniversalchardet.
- camel-undertow: undertow-servlet was pinned to undertow-version
  (2.4.2.Final), but Undertow never released a 2.4.x undertow-servlet
  jar; use the already-defined undertow-servlet-version (2.3.26.Final),
  matching what upstream Undertow itself pairs with undertow-core
  2.4.2.Final. That pairing exposes a real OSGi gap: wildfly-client-config
  1.0.1.Final (its last-ever release) has a stale Import-Package range for
  org.wildfly.common ([1.2,2.0)), predating wildfly-common 2.x, which
  Undertow's own build now forces. Relax the range via a wrap: override.
- camel-weaviate: Weaviate renamed its v6 Java client artifact from
  "client" to "client6"; the version (6.3.0) was already correct.
- camel-spring-rabbitmq: declare the Netty bundles amqp-client actually
  depends on (verified against its POM). Not required for this repo's
  combined multi-feature verification, since other already-installed
  features happen to provide Netty, but a standalone install of just
  this feature was missing them.
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.

1 participant