osgiapache-felixamdatu

Apache felix osgi unable to export package


I have below set up in manifest.mf file,

    Manifest-Version: 1.0
Bnd-LastModified: 1359719312904
Bundle-Activator: org.amdatu.mongo.impl.Activator
Bundle-ManifestVersion: 2
Bundle-Name: org.amdatu.mongo
Bundle-SymbolicName: org.amdatu.mongo
Bundle-Version: 1.0.4
Created-By: 1.7.0_09 (Oracle Corporation)
Export-Package: org.amdatu.mongo;uses:="com.mongodb";version="1.0"
Import-Package: com.mongodb,org.amdatu.mongo;version="[1.0,2)",org.apach
 e.felix.dm;version="[3.0,4)",org.osgi.framework;version="[1.5,2)",org.o
 sgi.service.cm;version="[1.3,2)",org.osgi.service.log;version="[1.3,2)"
Private-Package: org.amdatu.mongo.impl
Tool: Bnd-1.51.0

When I install this bundle I am not getting org.amdatu.mongo package in export list in apache felix? Please check the image below ...my bundle is in active plus running state.Still I am not able to see export package??

enter image description here

I have no package with ID 508 from which this bundle importing the org.amdatu.mongo

I have search in web console and I got only one bundle.Please check the image below,

enter image description here


Solution

  • The problem is not that Felix is unable to export the package. It just doesn't need to.

    You have listed the package org.amdatu.mongo as both an export and an import. This gives the OSGi Framework a choice: import it if there is an another bundle already exporting it; otherwise, export it.

    So in other words you are seeing normal, correct behaviour.