John Ross created ARIES-1419:
--------------------------------

             Summary: Provide-Capability header parser does not support typed 
attributes.
                 Key: ARIES-1419
                 URL: https://issues.apache.org/jira/browse/ARIES-1419
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
    Affects Versions: subsystem-2.0.2
            Reporter: John Ross
            Assignee: John Ross


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.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to