Skip to content
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

After update to 6.5.0, in osgi/felix runtime the bundle is not started due to missing dependency #170

Closed
oana-dc opened this issue Apr 5, 2023 · 4 comments
Milestone

Comments

@oana-dc
Copy link

oana-dc commented Apr 5, 2023

In the version 6.5.0, the osgi.serviceloader.registrar is no longer optional.
The Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))",osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"

In absence of an osgi service loader, the bundle is not started. The runtime error :

org.osgi.framework.BundleException: Unable to resolve com.fasterxml.woodstox.woodstox-core [16](R 16.0):
missing requirement [com.fasterxml.woodstox.woodstox-core [16](R 16.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))
Unresolved requirements: [[com.fasterxml.woodstox.woodstox-core [16](R 16.0)] osgi.extender; (&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))]
[ERROR] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
[ERROR] at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
[ERROR] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)
[ERROR] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:829)

Searching the issues, I found an older one, with the same subject:
#154
The resolution was to make it optional.

@cowtowncoder
Copy link
Member

@chrisr3 I have a sense of Deja Vu here... did I manage to break something wrt 6.5.0 release? :-/

@chrisr3
Copy link
Contributor

chrisr3 commented Apr 12, 2023

@chrisr3 I have a sense of Deja Vu here... did I manage to break something wrt 6.5.0 release? :-/

Well, you seem to have reverted this, if that's what you mean:

commit c8e64cb146b3902aec0a88c9fd2b387c18bf8f58
Author: Tatu Saloranta <tatu.saloranta@iki.fi>
Date:   Wed Jan 11 19:38:01 2023 -0800

    Revert "Declare osgi.serviceloader.registrar requirement as optional. (#155)" (#164)
    
    This reverts commit bc4ce73b56514928742c643e02e22bffedc63607.

I think the problem was that the OPTIONAL setting for this annotation is an Enum and not a String, and some byte-code scanner was warning that it couldn't find the Enum class. So until Bnd modifies their annotation, we're going to need to create this particular piece of OSGi metadata manually 🤦.


Something like #172, perhaps?

@cowtowncoder
Copy link
Member

@chrisr3 Ah. Ok, yes, that was the issue: annotation-based mechanism to ease life of OSGi users broke tooling of some non-OSGi users (or required adding dependencies).

I'd be happy to merge #172, publish 6.5.1, as long as someone could try confirming it helps (I trust it should but cannot independently really verify myself).

@oana-dc Do you think you could try building snapshot from PR #172 and see if that would work better? That'd be super helpful if possible.

@cowtowncoder cowtowncoder added this to the 6.5.1 milestone Apr 19, 2023
cowtowncoder added a commit that referenced this issue Apr 19, 2023
@cowtowncoder
Copy link
Member

Fixed for 6.5.1 (now published) via #172. I hope.

odl-github pushed a commit to opendaylight/odlparent that referenced this issue May 15, 2023
https://github.com/FasterXML/woodstox/wiki/Woodstox-Release-6.5#650-14-jan-2023
FasterXML/woodstox#170

Change-Id: I713fab14d83e083afea4b1eea754fcbb8b1febd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
odl-github pushed a commit to opendaylight/odlparent that referenced this issue May 15, 2023
https://github.com/FasterXML/woodstox/wiki/Woodstox-Release-6.5#650-14-jan-2023
FasterXML/woodstox#170

Change-Id: I713fab14d83e083afea4b1eea754fcbb8b1febd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 718e058)
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

No branches or pull requests

3 participants