4 Replies Latest reply on Oct 8, 2012 4:03 AM by pkilian

    Issues with Blueprint and JBoss 7.1.3.Final

    pkilian

      When i try to start my bundle on JBoss 7.1.3.Final i get an Exception:

       

      ...

      Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve HostBundleRevision[de.hama.reach.services:0.1.0.SNAPSHOT]: missing requirement AbstractPackageRequirement[atts={osgi.wiring.package=org.osgi.service.blueprint, version=[1.0.0,2.0.0)},[de.hama.reach.services:0.1.0.SNAPSHOT]]

                at org.apache.felix.resolver.impl.Candidates.populateRevision(Candidates.java:291)

                at org.apache.felix.resolver.impl.Candidates.populate(Candidates.java:159)

                at org.apache.felix.resolver.impl.ResolverImpl.resolve(ResolverImpl.java:126)

       

      In http://mail-archives.apache.org/mod_mbox/aries-dev/201106.mbox/%3CBANLkTine2R1b9JD_xPcnzC_WNYZF0jXEhg@mail.gmail.com%3E i find that this import is added by the maven-bundle-plugin and that all blueprint containers should export this bundle.

      In the Spec in 121.13.5 you can read:

      "To mitigate type incompatibility problems, a Blueprint extender must export the

      org.osgi.service.blueprint package. In the uses: directive, it should list any packages of classes that

      can be shared between the Blueprint extender and the Blueprint bundle. Blueprint bundles should

      import this package."

       

      But it seems in org.osgi.enterprise-4.2.0.jar is no such export.

       

      Is this a bug in JBoss OSGi?

        • 1. Re: Issues with Blueprint and JBoss 7.1.3.Final
          thomas.diesler

          I see this package exported by the blueprint extender

           

          12:59:02,950 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4) Install resource: HostBundleRevision[org.apache.aries.blueprint:0.4.0]
          12:59:02,956 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XIdentityCapability[atts={osgi.identity=org.apache.aries.blueprint, type=osgi.bundle, version=0.4.0},dirs={blueprint.graceperiod=false},[anonymous]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XResourceCapability[atts={osgi.wiring.bundle=org.apache.aries.blueprint, bundle-version=0.4.0},dirs={blueprint.graceperiod=false},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XHostCapability[atts={osgi.wiring.host=org.apache.aries.blueprint, bundle-version=0.4.0},dirs={blueprint.graceperiod=false},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.osgi.service.blueprint, version=1.0.1},dirs={uses=org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect,org.apache.aries.blueprint,org.apache.aries.blueprint.ext,org.apache.aries.blueprint.mutable,org.apache.aries.blueprint.compendium.cm},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.osgi.service.blueprint.container, version=1.0},dirs={uses=org.osgi.service.blueprint.reflect,org.osgi.framework},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.osgi.service.blueprint.reflect, version=1.0},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.apache.aries.blueprint, version=0.4},dirs={uses=org.osgi.service.blueprint.reflect,org.osgi.framework,org.w3c.dom},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.apache.aries.blueprint.services, version=0.4},dirs={uses=org.osgi.framework,org.apache.aries.blueprint,org.osgi.service.blueprint.container},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,957 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.apache.aries.blueprint.mutable, version=0.3.2},dirs={uses=org.osgi.service.blueprint.reflect,org.apache.aries.blueprint,org.osgi.framework},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,958 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageCapability[atts={osgi.wiring.package=org.apache.aries.blueprint.ext.evaluator, version=0.3.2},[org.apache.aries.blueprint:0.4.0]]
          12:59:02,958 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    XPackageRequirement[atts={osgi.wiring.package=javax.xml.namespace},[org.apache.aries.blueprint:0.4.0]]
          

           

          The example then wires correctly to that bundle

           

          13:55:54,708 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3) Resolve: [HostBundleRevision[example-blueprint:0.0.0]], []
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3) Resolution result: 1
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)    HostBundleRevision[example-blueprint:0.0.0]: 19 wires
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.service.packageadmin},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.service.blueprint.container},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[osgi.enterprise:4.2.0.201003190513]]
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=javax.management},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.osgi.repository},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.osgi.resolver},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,719 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.service.repository},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.resource},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.service.blueprint, version=[1.0.0,2.0.0)},[example-blueprint:0.0.0]] -> [HostBundleRevision[org.apache.aries.blueprint:0.4.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.junit.runner},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.osgi.framework},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.shrinkwrap.api.spec},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.arquillian.container.test.api},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.arquillian.junit},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.arquillian.osgi},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,720 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.arquillian.test.api},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,721 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.shrinkwrap.api},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,721 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.jboss.shrinkwrap.api.asset},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,721 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=org.junit},[example-blueprint:0.0.0]] -> [AbstractBundleRevisionAdaptor[arquillian-service:0.0.0]]
          13:55:54,721 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-3)       XPackageRequirement[atts={osgi.wiring.package=javax.inject},[example-blueprint:0.0.0]] -> [SystemBundleRevision[system.bundle:0.0.0]]
          

           

          This is with the latest jboss-as/master (i.e. 7.2.0.Alpha1-SNAPSHOT)

          • 2. Re: Issues with Blueprint and JBoss 7.1.3.Final
            pkilian

            I see no org.apache.aries.blueprint bundle:

             

            08:37:42,017 INFO  [org.jboss.osgi.framework] (MSC service thread 1-2) JBOSGI011006: OSGi Framework - 1.3.1.CR1

            08:37:42,429 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011001: Bundle installed: org.jboss.spec.javax.servlet.jboss-servlet-api_2.5_spec:1.0.1.Final

            08:37:42,430 INFO  [org.jboss.osgi.framework] (MSC service thread 1-2) JBOSGI011001: Bundle installed: osgi.enterprise:4.2.0.201003190513

            08:37:42,445 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011001: Bundle installed: org.apache.felix.log:1.0.0

            08:37:42,450 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011001: Bundle installed: jboss-osgi-logging:1.0.0

            08:37:42,468 INFO  [org.jboss.osgi.framework] (MSC service thread 1-1) JBOSGI011001: Bundle installed: org.apache.felix.configadmin:1.2.8

            08:37:42,474 INFO  [org.jboss.osgi.framework] (MSC service thread 1-1) JBOSGI011001: Bundle installed: jboss-as-osgi-configadmin:7.1.3.Final

            08:37:42,664 INFO  [org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011011: Starting bundles for start level: 1

            08:37:42,665 INFO  [org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011000: OSGi Framework started

             

            And the bundle osgi.enterprise:4.2.0.201003190513 exports only org.osgi.service.blueprint.reflect and org.osgi.service.blueprint.container:

             

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4) Install resource: HostBundleRevision[osgi.enterprise:4.2.0.201003190513]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractIdentityCapability[atts={osgi.identity=osgi.enterprise, type=osgi.bundle, version=4.2.0.201003190513},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractBundleCapability[atts={osgi.wiring.bundle=osgi.enterprise, bundle-version=4.2.0.201003190513},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractHostCapability[atts={osgi.wiring.host=osgi.enterprise, bundle-version=4.2.0.201003190513},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx.service.cm, version=1.3},dirs={uses=javax.management.openmbean},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx.framework, version=1.5},dirs={uses=org.osgi.jmx,javax.management.openmbean},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx.service.permissionadmin, version=1.2},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx.service.provisioning, version=1.2},dirs={uses=javax.management.openmbean},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,636 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx.service.useradmin, version=1.1},dirs={uses=org.osgi.jmx,javax.management.openmbean},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,637 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.jmx, version=1.0},dirs={uses=javax.management.openmbean},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,637 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.service.blueprint.reflect, version=1.0.1},[osgi.enterprise:4.2.0.201003190513]]

            08:10:03,637 DEBUG [org.jboss.osgi.resolver] (MSC service thread 1-4)    AbstractPackageCapability[atts={osgi.wiring.package=org.osgi.service.blueprint.container, version=1.0.1},dirs={uses=org.osgi.service.blueprint.reflect,org.osgi.framework},[osgi.enterprise:4.2.0.201003190513]]

            • 3. Re: Issues with Blueprint and JBoss 7.1.3.Final
              thomas.diesler

              Have you installed the Aries Blueprint container?

               

              This is documented in the wiki

              https://docs.jboss.org/author/display/JBOSGI/Provided+Examples#ProvidedExamples-BlueprintContainer

              • 4. Re: Issues with Blueprint and JBoss 7.1.3.Final
                pkilian

                Thank you Thomas, this was the solution.

                 

                I have not seen this paragraph in the documentation :-( 

                 

                Sorry for your time and effort.

                 

                Best regards

                Peter