Croway opened a new pull request, #209:
URL: https://github.com/apache/camel-spring-boot-examples/pull/209
## Summary
Same underlying bug as #206 (`rest-cxf`), replicated across all 3 services
in this example:
- `random`, `even`, and `odd` `CamelRouter`s each dispatched on
`${header.operationName}`, a header CXF-RS never sets. `DefaultCxfRsBinding`
actually populates `CamelCxfOperationName` for every cxfrs request regardless
of binding style, so the header resolved empty and every REST call hit
`bean:...ServiceImpl?method=` with a blank method name, throwing
`MethodNotFoundException` (500).
- Fixed by routing on `${header.CamelCxfOperationName}` in all three modules
(kept the existing `toD` dispatch style already used here, consistent with
#206).
Additionally, `camel-opentelemetry` (v1) logs a deprecation warning
suggesting `camel-opentelemetry2`. Migrated all 3 services:
- Swapped `camel-opentelemetry-starter` → `camel-opentelemetry2-starter` in
`rest-cxf-opentelemetry/pom.xml`.
- Swapped `@CamelOpenTelemetry` → `@CamelOpenTelemetry2` (and the
corresponding import) in each service's `Application` class.
- This matches the convention already used by the sibling
`opentelemetry/*Booking` examples in this repo, which are already on
`camel-opentelemetry2-starter`.
The OTel javaagent (2.19.0) attaches fine on JDK 25 here, confirmed while
testing.
## Test plan
- [x] `mvn -pl
rest-cxf-opentelemetry,rest-cxf-opentelemetry/rest-cxf-otel-common,rest-cxf-opentelemetry/rest-cxf-otel-random,rest-cxf-opentelemetry/rest-cxf-otel-even,rest-cxf-opentelemetry/rest-cxf-otel-odd
-am package`
- [x] Built the OTel javaagent via `-Potel-agent`, started `docker-compose`
(minio, otel-collector, jaeger), pre-created the `evenodd` minio bucket, and
ran all 3 services (random:8080, even:8081, odd:8082) with the javaagent
attached
- [x] `POST /services/api/play/5` on `random` → 200, correct even/odd split
result (exercises the full random → even/odd → register → minio round trip)
- [x] `POST /services/api/check` on `even` and `odd` directly → 200
- [x] `GET /services/api/generate` on `random` → 200
- [x] Logs confirm `Opentelemetry2 enabled`, no deprecation warning, no
exceptions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]