title: How to resolve jersey.internal.RuntimeDelegateImpl with Jersey on OSGi
body: <p>Im am using Jersey in an OSGi environment. I wrapped all Jetty and Jersey jars in one bundle containing also my own server / servlet / resource abstraction. This is running quite well. I am importing the javax.ws.rs-api via OSGi package import because related packages are also used by JAX-RS resource implementations in other bundles.</p>
  
  <p>However, from time to time my implementation does not work with an "java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl cannot be found by javax.ws.rs-api_2.1.0".</p>
  
  <p>It seems this could be a race condition. Maybe Jersey sometimes uses a class from my internal bundles and sometimes a class from imported javax. I cannot really figure out what the problem is.</p>
  
  <p>The problem is similar to [1], but in my case it is not about any import or dependency. I wrapped the Jetty and Jersey Jars in an OSGi bundle.</p>
  
  <p>[1] <a href="https://stackoverflow.com/questions/19452887/org-glassfish-jersey-internal-runtimedelegateimpl-not-found">org.glassfish.jersey.internal.RuntimeDelegateImpl NOT FOUND</a></p>