0

I'm new to OSGi. I'm using Apache Felix. I have build a bundle, and that has a dependency. When I try to start the bundle with start file:/path/to/bundle.jar it gives me this error.

org.osgi.framework.BundleException: Unable to resolve lk.ucsc.research.BellyRunner [20](R 20.0): missing requirement [lk.ucsc.research.BellyRunner [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package=lk.ucsc.research.bellygraph) Unresolved requirements: [[lk.ucsc.research.BellyRunner [20](R 20.0)] osgi.wiring.package; (osgi.wiring.package=lk.ucsc.research.bellygraph)]

My Maven project structure is as follows,

|-Belly
  |-BellyGraph
  |-BellyRunner OSGi( dependencies: BellyGraph )

I tried adding <Embed-Dependency>BellyGraph</Embed-Dependency> too. But It didn't work. Please help me to get this run. The full POM could be found here on Github.

Milindu Sanoj Kumarage
  • 2,714
  • 2
  • 31
  • 54

1 Answers1

1

The error simply says that your OSGi run configuration is missing a bundle that exports the lk.ucsc.research.bellygraph package. This package is needed by the BellyRunner bundle to resolve.

I think that start learning OSGi using maven is not a good idea as many important details and concepts simply get concealed by the "mvn install" magic. If I were in you, I would start from the OSGi enRoute tutorial: http://enroute.osgi.org/qs/050-start.html

After that you can explore how to do this in maven: http://enroute.osgi.org/tutorial_eval/050-start.html

matteo rulli
  • 1,443
  • 2
  • 18
  • 30