[
https://issues.apache.org/jira/browse/TOMEE-4643?focusedWorklogId=1033297&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1033297
]
ASF GitHub Bot logged work on TOMEE-4643:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Aug/26 07:53
Start Date: 01/Aug/26 07:53
Worklog Time Spent: 10m
Work Description: jungm opened a new pull request, #2877:
URL: https://github.com/apache/tomee/pull/2877
Jakarta REST requires `Feature` and `DynamicFeature` implementations
declared in `META-INF/services` to be registered through the JDK
`ServiceLoader` at deploy time ("Services", Providers / Lifecycle and
Environment).
CXF does not implement this lookup itself — it relies on the container to
hand it already resolved providers, which is why the CXF TCK run stays green on
GlassFish. TomEE assembles its provider list on its own, so features packaged
this way never registered.
## Changes
- `CxfRsHttpListener` scans both SPIs while assembling the provider list.
- Service loading is skipped when the `Application` maps
`jakarta.ws.rs.loadServices` to `Boolean.FALSE`, as the spec mandates, and the
existing `cxf.jaxrs.skip-provider-scanning` property is still honoured.
- Entries are loaded one at a time so a single broken descriptor entry is
logged and skipped instead of discarding the remaining providers of that type.
- Discovered instances flow through the existing `providers(...)` path, so
the `@ConstrainedTo` and deactivation checks still apply.
- Drops the now-passing TCK exclusion for
`jaxrs31/spec/extensions/JAXRSClientIT`.
## Testing
- New `ServiceLoaderProviderDiscoveryTest` (8 tests) exercises discovery
through a throwaway `URLClassLoader`, so it does not register these features
into other tests in the module. Each assertion was confirmed to fail when the
corresponding production change is reverted.
- `ee.jakarta.tck.ws.rs.jaxrs31.spec.extensions.JAXRSClientIT` passes 2/2
unexcluded against a rebuilt TomEE plus distribution; the wider `jaxrs31.**`
slice passes 4/4.
- Full `openejb-cxf-rs` suite: 123 tests, the only failure being
`EJBExceptionMapperTest.security`, which fails identically on a clean checkout
of `main`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Issue Time Tracking
-------------------
Worklog Id: (was: 1033297)
Remaining Estimate: 0h
Time Spent: 10m
> REST 3.1: no META-INF/services discovery for Feature/DynamicFeature
> -------------------------------------------------------------------
>
> Key: TOMEE-4643
> URL: https://issues.apache.org/jira/browse/TOMEE-4643
> Project: TomEE
> Issue Type: Bug
> Reporter: Markus Jung
> Assignee: Markus Jung
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> TomEE does not scan {{META-INF/services}} for {{Feature}} and
> {{DynamicFeature}} implementations. The REST 3.1 spec asks the runtime to
> pick these up through the standard Java {{ServiceLoader}} mechanism at deploy
> time. Because TomEE (through CXF) skips this step, a {{Feature}} or
> {{DynamicFeature}} packaged this way never registers, and any behavior it
> should add to the request or response pipeline never runs.
> Related upstream tracking: CXF-9005.
> This gap sits in TomEE's JAX-RS/CXF integration, not in the TCK or the test
> harness.
> Related to TOMEE-4321, the open umbrella ticket for JAX-RS TCK failures.
> NOTE: this issue originally also covered a second, unrelated gap — a request
> to an unmatched {{@Path}} returning HTTP 405 instead of 404. That has a
> different root cause and has been split out to TOMEE-4659.
> h2. Steps to reproduce / TCK reference
> Suite: Jakarta RESTful Web Services 4.0 TCK
> ({{jakarta.ws.rs:jakarta-restful-ws-tck:4.0.1}}).
> Feature/DynamicFeature discovery:
> *
> {{ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java#featureIsRegisteredTest}}
> *
> {{ee/jakarta/tck/ws/rs/jaxrs31/spec/extensions/JAXRSClientIT.java#dynamicFeatureIsRegisteredTest}}
> Both are excluded via the surefire {{<excludes>}} block in
> {{tck/jax-rs/jax-rs-tests/pom.xml}} (as a whole-class exclusion of
> {{**/jaxrs31/spec/extensions/JAXRSClientIT.java}}, since surefire cannot
> exclude individual methods). Remove that exclusion once fixed and the suite
> should pass those tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)