Quantcast

Dealing with osgi service in compendium

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dealing with osgi service in compendium

jomarmar
Hi,

I am having problems trying to use org.osgi.service.upnp. In Karaf 3.0.1, I am trying to install the org.osgi/org.osgi.compendium/5.0.0 to export the org.osgi.service.upnp package that I need for my development, but it somehow breaks Karaf (bundle commands not anymore available).
I have read about adding to config.properties the following line:

org.osgi.service.upnp;uses:="org.osgi.framework";version="1.2",\

to org.osgi.framework.system.packages property. It seems the package is exported (package:exports) but when running my bundle an exception is thrown saying that org.osgi.service.upnp.UPnPDevice class is not found.

I have managed to make it work by exporting org.osgi.service.upnp from my UPnP base driver (implementation).

I have read that OSGi compendium 5.0.0 is used by Karaf, so my question is where is this package? What do I need to install to get all OSGi services in compendium available?


By the way, installing the OSGi compendium used to work in previous versions of Karaf (even in Karaf-3.0.1-SNAPSHOT) but it is breaking Karaf-3.0.1)

Thanks,

Jorge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dealing with osgi service in compendium

jomarmar
Here is someone who had a similar problem with Karaf 2:

http://karaf.922171.n3.nabble.com/Karaf-2-9-9-and-UPnP-td4025889.html



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dealing with osgi service in compendium

jomarmar
Finally I have found a solution:
- I have added the following line in config.properties:
org.osgi.service.upnp;uses:="org.osgi.framework";version="1.2",\

- I have added osgi compendium jar to lib/ext so the service can be exported.
Loading...