Search code examples
osgijbossfuse

OSGi Bundle getting Loaded through another bundle


I am having an issue where one of my bundles is getting loaded through another bundle even when the two don't have any direct dependency on each other. Here's the scenario.

I have 3 bundles. Bundle A, B & C. The process flow is A->B->C. Hence there is no dependency between A & C.

When I deploy these 3, then for some reason bundle C is loaded through bundle A. I am using Jboss Fuse and through the karaf console, when I execute dev:show-tree on bundle A, it shows bundle C wired into bundle A.

If I remove bundle A, bundle C gets loaded on its own and I don't get any errors either.

I have inspected the features.xml file and pom for both A & C to see if they have any dependency whatsoever, but could not find anything.

Does anyone have any ideas on what else I could try or is there something that I am missing ?


Solution

  • Perhaps you have an optional Import-Package in bundle A that is exported by bundle C. Take a look at package:exports and bundle:headers.