question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSGi: does RestClientBuilder (non-CDI) require MP Config at runtime?

See original GitHub issue

Hi!

I’m trying to integrate a 3rd-party component that uses RestClientBuilder programmatically, as far as I can tell. Reading the spec, I understand that “it is possible to use MicroProfile Config”, if one uses CDI. That should imply that non-CDI implementations shouldn’t require MP Config at runtime. However, the OSGi resolver returns this:

Unable to resolve org.eclipse.microprofile.rest.client/2.0.0: missing requirement [org.eclipse.microprofile.rest.client/2.0.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.microprofile.config)(version>=2.0.0)(!(version>=3.0.0)))"
[caused by: Unable to resolve org.eclipse.microprofile.config/2.0.0: missing requirement [org.eclipse.microprofile.config/2.0.0] osgi.serviceloader; osgi.serviceloader=org.eclipse.microprofile.config.spi.ConfigProviderResolver; filter:="(osgi.serviceloader=org.eclipse.microprofile.config.spi.ConfigProviderResolver)"; effective:=active]

What am I missing (literally)? Do I have to provide a service implementing the ConfigProviderResolver interface, even if RestClientBuilder is used only programmatically?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
andymc12commented, Mar 24, 2021

Hi @brevilo - yes, the CDI and MP Config dependencies should be considered optional. This is a bug. Thanks for reporting it - I’ll try to have a fix out shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create separate API/SPI components · Issue #21 - GitHub
The current RestClientBuilder represents an API that end users ... OSGi: does RestClientBuilder (non-CDI) require MP Config at runtime? #308.
Read more >
Rest Client for MicroProfile
This simple API exposes one API call, located at /greet from the base URL of the client. Invoking this endpoint returns a javax.ws.rs.core....
Read more >
152 CDI Integration Specification - OSGi Enterprise 7
At runtime, when CCR needs to provide injection points an object whose type is a bean property type, CCR must construct an instance...
Read more >
OSGi overview - IBM
An OSGi bundle is a Java archive file that contains Java code, resources, and a manifest that describes the bundle and its dependencies....
Read more >
How can we update any bundle in OSGI during runtime
To understand this, you need to view the two parts of the OSGi landscape: services and (Java) classes/interfaces.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found