Skip to content

Too generic 'Require-Capability: osgi.extender' resulting in binding to Felix Configurator #276

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

Closed
richardscholten opened this issue Nov 10, 2020 · 2 comments · Fixed by #288

Comments

@richardscholten
Copy link

We have an OSGI application running on Felix, and we use the graphql-java-servlet library to serve GraphQL endpoints. In our log we see errors saying 'No configurations found at path OSGI-INF/configurator' coming from the Felix configurator.

The root cause is a requirement contained in the graphql-java-servlet bundle: osgi.extender:

https://github.com/graphql-java-kickstart/graphql-java-servlet/blob/master/graphql-java-servlet/bnd.bnd

It matches any capability provided in that namespace. The intended use of this namespace is to specify a specific extender (osgi.component or osgi.configurator).

With this too generic requirement, it can bind to any bundle that provides a osgi.extender capability. In this case it binds to the configurator bundle. This is unfortunate, as the configurator relies on the resolving of the requirement to detect whether it should process the bundle (as it assumes it was bound to the bundle on purpose). It searches for configuration that the bundle does not contain and logs the error message.

0 = {BundleWireImpl@2865} "[graphql-java-servlet [20](R 20.0)] osgi.extender; () -> [org.apache.felix.configurator [36](R 36.0)]"
m_requirer = {BundleRevisionImpl@2869} "graphql-java-servlet [20](R 20.0)"
m_req = {BundleRequirementImpl@2870} "[graphql-java-servlet [20](R 20.0)] osgi.extender; (
)"
m_provider = {BundleRevisionImpl@2871} "org.apache.felix.configurator [36](R 36.0)"
m_cap = {BundleCapabilityImpl@2872} "[org.apache.felix.configurator [36](R 36.0)] osgi.extender; {osgi.extender=osgi.configurator, version=1.0.0}"

Equally, it could have bound to the org.apache.felix.scr bundle, as it also provides a capability from the osgi.extender namespace.

@oliemansm
Copy link
Member

@richardscholten Unfortunately there currently is no longer a maintainer involved with OSGI experience. Therefore any contributions to help fix this bug would be highly appreciated!

@oliemansm
Copy link
Member

@richardscholten Do you know what change we need to make here to solve this issue?

@oliemansm oliemansm linked a pull request Dec 24, 2020 that will close this issue
oliemansm added a commit that referenced this issue Dec 25, 2020
…i-capability

Narrow require capability to component fix #276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants