Search code examples
eclipseosgi-bundleequinox

Fragment bundle is not getting activated


I have Two osgi bundles Bundle A and Bundle B. Bundle B is a fragment bundle of bundle A. When both components are in the osgi environment, Bundle A is in ACTIVE state but Bundle B is in RESOLVED state and it is not getting activated. Bundle B gets activated if I remove the <Fragment-Host> header.

Is there any specific way I have to define the fragment bundle? (other than adding the <Fragment-Host>? maybe add any annotations, etc)? . If there any sample resource I could use, please let me know

I'm using org.eclipse.osgi_3.11.0.v20160603-1336. Sample bundle can be found in https://github.com/chamilaadhi/sample-bundles

Thanks


Solution

  • Seems like the fragment bundles do not get to ACTIVE state[1][2]. Also found similar discussion related to this in Component inside a fragment never activated

    [1] https://osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module.fragmentbundles

    [2]https://dzone.com/articles/osgi-fragment-bundles-dont