1

I'm fascinating about OSGi enRoute's and BndTool's concepts of implementing apps. But I got stuck trying to use Blueprint Gemini. Please someone help me.

Question

How to get run a BndTools-based OSGi app with Blueprint Gemini 2.0.0?

My problem

  • I'd like to use Blueprint Gemini 2.0.0 in a BndTools-based OSGi application. But my OSGi bundle doesn't get resolved.
  • This error message is shown when trying to auto resolve:

missing requirement &(osgi.extender=osgi.blueprint)(version=[1.0.0,2.0.0))

  • I'm wondering why my bundle requires version <=1.0.0 and <2.0.0? This is not specified in any config file of my project (neither in *.bnd nor *.bndrun files)?

How my project is set up and configured

  • With BndTools 3.3 I created in Eclipse Neon a new “Bnd OSGi Project” and selected “OSGi enRoute 3.3.0” as project template.
  • OSGi Framework: org.eclipse.osgi;version='[3.10...]

  • For the project name the suffix “application” was choosen. *I then added a blueprint.xml.

  • In the *.bndrun file I added two bundles as “Run Requirements”:

    • my bundle and
    • org.eclipse.gemini.blueprint.extender. In the *.bndrun file I added two bundles as “Run Requirements”: my bundle and org.eclipse.gemini.blueprint.extender: The blueprint.extender bundle has been added to my Central repo using this Maven XML syntax:

    <dependency> <groupId>org.eclipse.gemini.blueprint</groupId> <artifactId>gemini-blueprintextender</artifactId> <version>2.0.0.RELEASE</version> </dependency>

  • How do you create the Manifest of your user bundle? Do you use maven-bundle-plugin or bnd-maven-plugin? – Christian Schneider Jan 16 '17 at 09:59
  • I'm using the BndTools default approach for creating the manifest, which is a “generated manifest approach”. BndTools tooks information from *.bnd config files and from other places to create the manifest.mf. – OrangeJuice Jan 16 '17 at 10:43
  • This means, I don't use Maven as build tool. It's just a Maven repo I tap. – OrangeJuice Jan 16 '17 at 10:49
  • The requirement is probably in your user bundle and is created by bnd during the build process. – Christian Schneider Jan 16 '17 at 12:15
  • Good idea, but nope, I already checked. This wouldn't make sense anyway, because blueprint follows the extender pattern. This means, my bundle doesn't have to know blueprint bundles. – OrangeJuice Jan 16 '17 at 12:48
  • Yes .. blueprint follows the extender pattern .. this is why bnd might create a requirement for the blueprint extender if it detects that you use a blueprint.xml – Christian Schneider Jan 16 '17 at 14:48
  • Even Apache Aries seems not to work with BndTools. I have started the Aries bundles in my OSGi app and configured a bundle with a blueprint config file. I will not get the above mentioned error message (missing requirement) but blueprint doesn't seem to execute - e.g. no blueprint specific output is printed on the console and blueprint lifecycle methods are not called. The same application executed without BndTools just only in the console or with Eclipse PDE does work. That's really too bad, because DS don't have the expressiveness that I need (no component based style, no real DI). – OrangeJuice Jan 31 '17 at 09:43
  • I just tested to run blueprint in bndtools and also saw the problem. I found that blueprint is not coming up as the ProxyManager service is missing. So you need to also deploy the aries proxy impl bundle. – Christian Schneider Jan 31 '17 at 10:37
  • I created a full example for it https://github.com/cschneider/Karaf-Tutorial/tree/master/tasklist/tasklist-index – Christian Schneider Feb 02 '17 at 10:23

0 Answers0