-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSGi / Spifly Provider for jakarta.ws.rs.ext.RuntimeDelegate cannot be found #5834
Comments
|
Corrected, it is in fact jakarta.ws.rs-api 3.1.0 |
Thanks for the correction. Regarding the issue itself, Jersey already runs within at least a Glassfish OSGi environment, and there are no issues with it. We have never tried it with Spifly. It is probably possible to add those entries to comply with Spifly. This could be considered an enhancement for future releases. |
It might well be the case that it works in other OSGi environments, but I wonder on how the SPI implementation is detected. It did work with jakarta.ws.rs-api 2.1.6 where Do you know how Glassfish uses the ServiceLoader within its OSGi environment, because the problems should be the same?! At the moment I am puzzled on how to fix this - as it would involve some weird classloading workarounds. |
What comes to my mind is just forking the Jersey repo, fixing it in the branch, and using a snapshot instead. If you then provide a PR to the Jersey repo (requires signing of ECA), it would make the fix available in the nearest version of Jersey. Otherwise, we could fix that later. |
I made some progress here, and found out that every medal has two sites - lets sum it up
So in my scenario, the following patch will provide mark the services to spifly being BUT col-panic/jax-ws-api@4e3cdba#diff-e55bdf06100eef1c252327789d9233a9f5fc308dc7f6b5e60caccaa6c3c44477R146 REF jakartaee/jax-ws-api#227 JAXB as Example
This project simply seem to not yet have picked this up For my test scenario the capabilities I mention here do suffice to make it run! I am sure, however, that for a proper patch we would have to expose all services that are somehow concered by |
@col-panic - thanks for providing those patches and related info. Regarding the issue you are submitting to the jax-ws-api issue tracker - that is wrong API. You should submit the issue to the jakartaee/rest - that is the API Jersey implements. |
thanks @senivam for your feedback, this stuff keeps constantly confusing me, because somehow the patch there fixed the problem for me. So to set this straight
I see, somehow i mixed up my remotes - i will fix all of this and update the patches - might take some days.... |
yes, those URLs and descriptions you are providing:
are correct. |
I have an OSGI environment with jersey-common 3.1.9, jakarta.ws.rs 3.1.0 and spifly 1.3.7
On startup console says
jakarta.ws.rs.ext.RuntimeDelegate
is available withinjersey-common
and the/META-INF/services/jakarta.ws.rs.ext.RuntimeDelegate
file exists.It is, however, NOT being picked up by spifly. This is due to
/META-INF/MANIFEST.MF
not containing the requiredRequire-Capability
andProvide-Capability
entries. See https://aries.apache.org/documentation/modules/spi-fly.html#specconf for details.For example:
logback-classic
correctly writes this info toMANIFEST-MF
in https://github.com/qos-ch/logback/blob/5610c96b4d705a4fe6ded9c42d4f47cb92bbbd95/logback-classic/pom.xml#L343while
jersey-common
does not do so in https://github.com/eclipse-ee4j/jersey/blob/d9658aa3064236abf1280f16e1705454e5d0b599/core-common/pom.xml#L150C25-L150C120So adding the resp. extension should make OSGI Spifly pick up the required RuntimeDelegate and make it run, while it should not change behaviour for non-osgi uses of the bundle.
The text was updated successfully, but these errors were encountered: