Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1419

Provide-Capability header parser does not support typed attributes.

    XMLWordPrintableJSON

Details

    • Patch

    Description

      I added a patch (require-capability-service.patch) that contains a test case to test the behavior with require-capability and provide-capability and it is failing. Maybe the test case is wrong, can someone check it?

      The test case has a feature with a bundle 1 and an embedded application with a bundle 2.
      Bundle 1 provides a service capability
      Bundle 2 requires a service capability

      I would expect all to be installed correctly but the install fails because of the require-capability for the service not resolving.

      missing requirement org.apache.aries.subsystem.core.archive.RequireCapabilityRequirement: namespace=osgi.service, attributes={}, directives=

      {filter=(objectClass=com.emagiz.osgi.environment.PropertiesSource), effective=active, resolution=mandatory}

      ------------------------------------------

      Try not using typed parameters in Provide-Capability and see what happens. I think there may be a parsing issue in that header.

      In other words, try removing ":List" from "osgi.service;objectClass:List=\"com.emagiz.osgi.environment.PropertiesSource\";effective:=\"active\"".

      --------------------------------------------

      Got it working by not using the ":List<String>" but kept the test case because it should work. Tested with type "String" and that works.
      Added another patch 'require-capability-service-2.patch' that contains three test cases.
      1) For a provide on root level
      2) For a provide on feature level
      3) For a provide with a List<String>

      All test cases have three levels: root/feature/application and the application has a bundle with require.

      Attachments

        1. require-capability-service-2.patch
          13 kB
          John Ross
        2. require-capability-service.patch
          7 kB
          John Ross

        Issue Links

          Activity

            People

              jwross@us.ibm.com John Ross
              jwross@us.ibm.com John Ross
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: