1 Reply Latest reply on Jul 18, 2012 8:45 AM by abara

    Trouble using OSGi service declared using SCR plugin

    abara

      Hi,

       

      Likely this is quite a newbie question...

       

      Hello1Service is using SCR plugin to declare and publish service.

       

      Hello1Camel is creating a bean, which uses the service and then bean is used in in camel route.

       

      On the surface:

       

      18:40:14,219 | INFO | rint Extender: 3 | BlueprintContainerImpl | ? ? | 10 - org.apache.aries.blueprint - 0.3.1 | Bundle com.videonext.tests.Hello1Camel is waiting for dependencies http://(objectClass=com.videonext.tests.Hello1Service.Hello1Service)

       

      smx@root> osgi:list|grep Hello

      210 Active Created 60 Hello1Service OSGi Bundle (0.0.1.SNAPSHOT)

      211 Active GracePeriod 60 Hello1Camel Blueprint Route (1.0.0.SNAPSHOT)

       

      When looking deeper into Hello1Service assembled bundle:

       

      afomenko:0 afomenko$ cat META-INF/MANIFEST.MF

      Manifest-Version: 1.0

      Bnd-LastModified: 1342463910466

      Build-Jdk: 1.6.0_33

      Built-By: afomenko

      Bundle-ManifestVersion: 2

      Bundle-Name: Hello1Service OSGi Bundle

      Bundle-SymbolicName: com.videonext.tests.Hello1Service

      Bundle-Version: 0.0.1.SNAPSHOT

      Created-By: Apache Maven Bundle Plugin

      Export-Package: com.videonext.tests.Hello1Service;version="0.0.1.SNAPSHO

      T",com.videonext.tests.Hello1Service.Impl;uses:="com.videonext.tests.He

      llo1Service";version="0.0.1.SNAPSHOT"

      Import-Package: org.osgi.service.blueprint;version="[1.0.0,2.0.0)"

      Service-Component: OSGI-INF/serviceComponents.xml

      Tool: Bnd-1.50.0

       

      afomenko:0 afomenko$ cat OSGI-INF/serviceComponents.xml

       

      <provide interface="com.videonext.tests.Hello1Service.Hello1Service"/>

       

       

      Hello1Camel is waiting forever to discover service which should have been essentially declared by Hello1Service exported configuration.

       

      Smaller issue: it looks like maven-plugin is ignoring export directive not to export "Impl" packages, but this is not a biggest issue.

       

      Not sure where to go next from here. Please help!

       

      Thank you