[ 
https://issues.apache.org/jira/browse/ARIES-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14591703#comment-14591703
 ] 

David Bosschaert commented on ARIES-1307:
-----------------------------------------

After applying the patch I am getting some test failures. Could this be because 
the patch updated/reuses a pre-existing test bundles for its new logic and that 
there are existing tests that don't work with these changes? If that's the case 
then it would be better to create entirely new test bundles for this behavior. 
[~sbratton] could you please take a look?

The errors I'm getting are:
{code}testFeature1(org.apache.aries.subsystem.itests.FeatureTest)  Time 
elapsed: 6.513 sec  <<< ERROR!
org.osgi.service.resolver.ResolutionException: Unable to resolve 
org.apache.aries.subsystem.core.internal.RawSubsystemResource@7736386: missing 
requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: 
namespace=osgi.wiring.package, attributes={}, 
directives={filter=(&(osgi.wiring.package=org.apache.aries.subsystem.itests.tb1)(version>=0.0.0))},
 
resource=/var/folders/fk/0n8fx3k91ls8lh981zzmm2lh0000gn/T/inputStreamExtract5401944225415346678.zip/feature2.esa/tb2.jar
        at 
org.apache.felix.resolver.Candidates.populateResource(Candidates.java:298)
        at org.apache.felix.resolver.Candidates.populate(Candidates.java:161)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:146)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:372)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:355)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:97)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:89)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:54)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:30)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:620)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:664)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:263)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystem(SubsystemTest.java:806)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystem(SubsystemTest.java:801)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystemFromFile(SubsystemTest.java:788)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystemFromFile(SubsystemTest.java:780)
        at 
org.apache.aries.subsystem.itests.FeatureTest.testFeature1(FeatureTest.java:48)

testSharedContent(org.apache.aries.subsystem.itests.FeatureTest)  Time elapsed: 
0.912 sec  <<< ERROR!
org.osgi.service.resolver.ResolutionException: Unable to resolve 
org.apache.aries.subsystem.core.internal.RawSubsystemResource@481bc0db: missing 
requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: 
namespace=osgi.wiring.package, attributes={}, 
directives={filter=(&(osgi.wiring.package=org.apache.aries.subsystem.itests.tb1)(version>=0.0.0))},
 
resource=/var/folders/fk/0n8fx3k91ls8lh981zzmm2lh0000gn/T/inputStreamExtract4199806731269145524.zip/feature2.esa/tb2.jar
        at 
org.apache.felix.resolver.Candidates.populateResource(Candidates.java:298)
        at org.apache.felix.resolver.Candidates.populate(Candidates.java:161)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:146)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:372)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:355)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:97)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:89)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:54)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:30)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:620)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:664)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:263)
        at 
org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystem(SubsystemTest.java:806)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystem(SubsystemTest.java:801)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystemFromFile(SubsystemTest.java:788)
        at 
org.apache.aries.subsystem.itests.SubsystemTest.installSubsystemFromFile(SubsystemTest.java:780)
        at 
org.apache.aries.subsystem.itests.FeatureTest.testSharedContent(FeatureTest.java:138){code}

> mandatory matching directive on exported packages cause all importers to fail
> -----------------------------------------------------------------------------
>
>                 Key: ARIES-1307
>                 URL: https://issues.apache.org/jira/browse/ARIES-1307
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: Thomas Watson
>            Assignee: David Bosschaert
>             Fix For: subsystem-core-2.0.1
>
>         Attachments: ARIES-1307.patch
>
>
> If you have subsystem that includes a resource with something like the 
> following export:
> Export-Package: org.apache.felix.service.command; status=provisional; 
> mandatory:=status
> And then another resource that correctly specifies the mandatory matching 
> attribute like the following:
> Import-Package: org.apache.felix.service.command; status=provisional
> The subsystems implementation will not allow the resource with the import 
> package header resolve to the package capability with the mandatory directive.
> This is because ImportPackageRequirement.ImportPackageRequirement(Clause, 
> Resource) constructor does not correctly handle the matching attributes of 
> the clause.  The filter created only has the packagename and if specified the 
> package version range.



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

Reply via email to