[tag:We are migrating our jetty, jersey library to non vulnerable version for our OSGi project which is based on Declarative service (Apache SCR) and for all the rest API/resource we are getting 404
Here is the OSGi and jar version
org.osgi.core version 6.0.0
org.apache.felix.http.jetty version 4.2.22
org.osgi.compendium version 5.0.0
org.glassfish.hk2.hk2-util version 2.6.1
org.glassfish.hk2.hk2-api version 2.6.1
org.glassfish.hk2.hk2-locator version 2.6.1
org.glassfish.hk2.external.jakarta.inject version 2.6.1
org.glassfish.hk2.osgi-resource-locator version 1.0.3
org.apache.felix.scr version 2.1.26
org.glassfish.jersey.core.jersey-server version 2.41
org.glassfish.jersey.core.jersey-client version 2.41
org.glassfish.jersey.core.jersey-common version 2.41
org.glassfish.jersey.containers.jersey-container-servlet-core version 2.41
org.glassfish.jersey.media.jersey-media-json-jackson version 2.41
org.glassfish.jersey.ext.jersey-entity-filtering version 2.41
also using
com.google.inject.guice version 4.0 for additional Binding
After upgrading version we were able to compile the code with JDK 11.
Deploying the generated bundles into Apache Felix but at deployment we are getting InjectionManagerFactory not found error, so we have added org.glassfish.jersey.inject.jersey-hk2 version 2.41 in pom but no use also tried to add in bnd.bnd file also in META-INF/MANIFEST.MF file but still getting same issue.
Before adding jersey-hk2 in pom my unit test case were also failing with same error but now my test cases are running successfully after adding jersey-hk2 jar but at runtime still at,
org.glassfish.jersey.internal.inject.Injections.lookupService(Class clazz) of jersey-common
getting InjectionMangerFactory not found. Please guide us to resolve the issue
How OSGI will pick up that jersey-hk2 jar at runtime.]