We're using Jersey for several years now - for the server-side as well as for the client side. Currently we migrating to v3.1.11. The server-side is working fine, but with the client we struggle: We're trying to run a JerseyClient in our equinox OSGI environment, but always get stuck with the following exception:
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:75)
The actual base structure and the code is generated by the OpenAPI Generator. Here we're using the 'jersey3' option for the library. Further, we wrap the produced code in our own OSGI-bundle, were the required bundles are as followed (everty bundle is provided by our target platform and with the previous version everthing worked fine):
- jakarta.ws.rs-api,
- jakarta.inject.jakarta.inject-api,
- jakarta.annotation-api,
- org.glassfish.jersey.core.jersey-client,
- org.glassfish.jersey.inject.jersey-hk2,
- org.glassfish.jersey.media.jersey-media-multipart,
- org.glassfish.jersey.media.jersey-media-json-jackson,
- org.glassfish.jersey.core.jersey-common,
- org.glassfish.hk2.osgi-resource-locator,
- com.fasterxml.jackson.core.jackson-core,
- com.fasterxml.jackson.core.jackson-annotations,
- com.fasterxml.jackson.core.jackson-databind,
- wrapped.org.openapitools.jackson-databind-nullable,
- com.fasterxml.jackson.datatype.jackson-datatype-jsr310,
- de.enflexit.awb.ws.client,
We tried a couple of things:
- start level adjustements of the client bundle
- hours of searching
- introduced additinal bundles as possible dependencies
- trying to path system arguments
Further, we found - beside other - the open issue OSGi / Spifly Provider for... and wonder, if there is any progress.
Overall, we're feel a little bit lost. - Any idea or advice?
We're using Jersey for several years now - for the server-side as well as for the client side. Currently we migrating to v3.1.11. The server-side is working fine, but with the client we struggle: We're trying to run a JerseyClient in our equinox OSGI environment, but always get stuck with the following exception:
java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.client.ClientBuilder cannot be found at jakarta.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:75)The actual base structure and the code is generated by the OpenAPI Generator. Here we're using the 'jersey3' option for the library. Further, we wrap the produced code in our own OSGI-bundle, were the required bundles are as followed (everty bundle is provided by our target platform and with the previous version everthing worked fine):
We tried a couple of things:
Further, we found - beside other - the open issue OSGi / Spifly Provider for... and wonder, if there is any progress.
Overall, we're feel a little bit lost. - Any idea or advice?