1 Reply Latest reply on Feb 14, 2012 5:02 PM by Dustin S.

    OSGi unsatisfied dependency even though dependency is available - Equinox

    Dustin S. Newbie



      I have a strange problem that only occurs with Equinox. Felix does not have this problem.


      I have a bundle that exports a service:


      karaf@root> ls 279
      further-mdr-ws (279) provides:
      org.springframework.osgi.bean.name = mdrAssetServiceRestClient
      Bundle-SymbolicName = edu.utah.further.mdr.ws
      Bundle-Version = 1.1.0.SNAPSHOT
      objectClass = edu.utah.further.mdr.ws.api.service.rest.AssetServiceRest
      service.id = 547


      And then I have a bundle that imports that service:


      <osgi:reference id="mdrAssetServiceRestClient"
           interface="edu.utah.further.mdr.ws.api.service.rest.AssetServiceRest" />


      However, the bundle is always in a waiting state:


      [ 300] [Active     ] [            ] [Waiting] [   60] further-ds-impl (1.1.0.SNAPSHOT)


      The logs show it is waiting for the service that is available:


      14:45:09,521 | INFO  | xtenderThread-76 | DependencyServiceManager         | 85 - org.springframework.osgi.extender - 1.2.1 | OsgiBundleXmlApplicationContext(bundle=edu.utah.further.ds.impl, config=META-INF/spring/*-all.xml) is waiting for unsatisfied dependencies [[&mdrAssetServiceRestClient]]


      I've also verified that the importing bundle has the interface imported


      karaf@root> imports 300
      further-mdr-ws-api (278): edu.utah.further.mdr.ws.api.service.rest; version="1.1.0.SNAPSHOT"


      Again, this only happens with Equinox and not Felix. What else could prevent it from being resolved?