Skip to content

CAMEL-24476/24477/24478: muteException for the mina, cxf and grpc consumers, backport to camel-4.22.x - #25934

Merged
davsclaus merged 4 commits into
apache:camel-4.22.xfrom
oscerd:backport/glasswing-muteexception-4.22.x
Aug 31, 2026
Merged

CAMEL-24476/24477/24478: muteException for the mina, cxf and grpc consumers, backport to camel-4.22.x#25934
davsclaus merged 4 commits into
apache:camel-4.22.xfrom
oscerd:backport/glasswing-muteexception-4.22.x

Conversation

@oscerd

@oscerd oscerd commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Backport to camel-4.22.x of three consumer fixes already reviewed and merged on main. Each aligns a consumer with the muteException behaviour CAMEL-23651 established for the HTTP consumers: a route failure no longer hands the remote caller the exception class, message or stack trace.

Behaviour change. muteException defaults to true, so a consumer that used to echo the failure now returns a generic error. Set muteException=false to restore the old output. This matches what CAMEL-23651 did for the HTTP consumers.

Deviations from a straight cherry-pick, both mechanical:

  • MinaMuteExceptionTest uses JUnit assertions instead of AssertJ. camel-mina has no assertj test dependency on this branch and its other 36 test classes are JUnit, so adding one was the wrong trade for a backport.
  • The grpc commit on main carried an unrelated YAML DSL schema regeneration that removes csimple from the expression list. That hunk is left out; csimple is still valid on this branch.

The upgrade-guide entries are not included: the guides for every line live on main.

Built and tested per module on this branch (camel-mina, camel-cxf-soap, camel-grpc), including the new and touched tests. Catalog and DSL mirrors regenerated from this branch, so no main-only metadata leaks in.

Claude Code on behalf of oscerd

oscerd and others added 3 commits August 31, 2026 09:55
The consumer wrote exchange.getException() straight back over the socket, so a
route failure handed the remote peer the exception class and message over a
textline codec, and its serialised form over the object codec.

muteException defaults to true, matching the http consumers aligned by CAMEL-23651.

(cherry picked from commit 7af3e74)

MinaMuteExceptionTest uses JUnit assertions here: camel-mina on this branch has no
assertj test dependency, and its other 36 test classes are JUnit.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
An exception thrown by the route was described back to the SOAP client in the
fault, exposing internal types and messages. Declared faults (@webfault) are
still reported as before, since those are part of the service contract.

(cherry picked from commit fd4fd27)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The consumer put the route exception's message into the gRPC status description,
so the caller received internal detail on failure.

(cherry picked from commit 3c99874)

The main commit also carried an unrelated YAML DSL schema regeneration that drops
csimple; that hunk is left out, csimple is still valid on this branch.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-cxf/camel-cxf-soap
  • components/camel-grpc
  • components/camel-mina
  • dsl/camel-componentdsl
  • dsl/camel-endpointdsl
  • tests/camel-itest

🔬 Scalpel shadow comparison — Scalpel: 20 tested, 25 compile-only — current: 16 all tested

Maveniverse Scalpel detected 45 affected modules (current approach: 16).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 20 modules (7 direct + 13 downstream), skip tests for 25 (generated code, meta-modules)

Modules Scalpel would test (20)
  • camel-catalog
  • camel-componentdsl
  • camel-cxf-soap
  • camel-cxf-spring-soap
  • camel-endpointdsl
  • camel-fhir
  • camel-grpc
  • camel-hl7
  • camel-itest
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
  • camel-mina
  • camel-soap
  • camel-syslog
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
Modules with tests skipped (25)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-csimple-maven-plugin
  • camel-endpointdsl-support
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

All tested modules (45 modules)
  • Camel :: All Components Sync point
  • Camel :: Assembly
  • Camel :: CXF :: SOAP
  • Camel :: CXF :: SOAP :: Spring
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Suggest
  • Camel :: Component DSL
  • Camel :: Coverage
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: FHIR
  • Camel :: HL7
  • Camel :: Integration Tests
  • Camel :: JBang :: Core
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Main
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: MINA
  • Camel :: SOAP
  • Camel :: Syslog
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin
  • Camel :: gRPC

⚙️ View full build and test results

CxfEndpoint's muteException consumer option now defaults to true (CAMEL-24477),
so an undeclared route failure such as this test's authorization denial no longer
leaks its message to the SOAP caller.

(cherry picked from commit f922ada)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the tests label Aug 31, 2026

@gnodet gnodet 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.

Clean backport of muteException consumer options (CAMEL-24476/24477/24478) from main to camel-4.22.x. Implementation code matches the main branch commits character-for-character; deviations are reasonable and documented.

Highlights:

  • All three component implementations (CxfConsumer, GrpcMethodHandler, MinaConsumer) and their configuration classes match the main branch commits exactly.
  • The CXF implementation correctly separates route failures from deliberate faults and exempts @WebFault-annotated exceptions from muting — preserving SOAP contract compliance while protecting against information leakage.
  • All existing tests that assert on exception details have been correctly adapted with muteException=false. The assertj-core dependency was correctly added to camel-cxf-soap for the new test.
  • Generated code (catalog JSON, endpoint configurers, URI factories, DSL builders) is updated consistently.
  • csimple schema and upgrade guide entries correctly excluded.

📋 PR Metadata

Aspect Current Suggested
Milestone (none) 4.22.1

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@davsclaus davsclaus added this to the 4.22.1 milestone Aug 31, 2026
@davsclaus davsclaus added the bug Something isn't working label Aug 31, 2026
@davsclaus
davsclaus merged commit 9a6e822 into apache:camel-4.22.x Aug 31, 2026
4 checks passed
davsclaus pushed a commit that referenced this pull request Aug 31, 2026
…sumers, backport to camel-4.18.x

Backports three consumer fixes already reviewed and merged on main to camel-4.18.x
(the same set backported to camel-4.22.x in #25934). Each adds a muteException
consumer option, defaulting to true, so a route failure no longer hands the remote
caller the exception class, message or stack trace: mina consumers stop echoing
exceptions back over the socket, cxf/SOAP faults for undeclared exceptions no
longer describe internal types and messages (declared @webfault faults are
unaffected), and grpc no longer puts the route exception's message into the status
description. This aligns all three with the behaviour CAMEL-23651 established for
the HTTP consumers.

This branch has diverged from main in the test layer and in CxfConsumer, so three
commits needed manual conflict resolution rather than a mechanical cherry-pick:
MinaMuteExceptionTest uses JUnit assertions to match this branch's existing style,
CxfConsumer keeps its instanceof-and-cast Fault check instead of main's
pattern-matching form, and GrpcConsumerExceptionTest keeps this branch's
AvailablePortFinder-based port binding since GrpcTestSupport doesn't exist here.
An unrelated YAML DSL schema regeneration hunk was left out of the grpc commit.
Catalog and DSL mirrors were regenerated from this branch's module descriptors.
Also includes a GreeterClientTest update for the new cxf muteException default.
Upgrade-guide entries are intentionally excluded — those live on main only.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants