You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/11/15 21:58:11 UTC

[jira] [Commented] (ARIES-1453) Fragment-Host requirements with version range do not match with FragmentHostCapability

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

ASF GitHub Bot commented on ARIES-1453:
---------------------------------------

GitHub user tomdw opened a pull request:

    https://github.com/apache/aries/pull/30

    Aries 1453 test fragment host fix

    See https://issues.apache.org/jira/browse/ARIES-1453 for a description of the problem.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tomdw/aries ARIES-1453-testFragmentHostFix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/aries/pull/30.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #30
    
----
commit 657c10e58f7e9f63fab799eb965a83510b80b97f
Author: Tom De Wolf <t....@aca-it.be>
Date:   2015-11-15T20:16:52Z

    FragmentHostCapability should return version as real Version in order for correct requirement to capability matching to happen with version ranges

commit 434d0d2aa45016b8b0f3e46929ed5dfa312ab6ae
Author: Tom De Wolf <t....@aca-it.be>
Date:   2015-11-15T20:22:00Z

    add extra test that fails when FragmentHostHeader, FragmentHostRequirement, and FragmentHostCapability do not match with version ranges

commit d0fca5c8d758a2eec9510e71a1ad583269382dd3
Author: Tom De Wolf <t....@aca-it.be>
Date:   2015-11-15T20:56:39Z

    ARIES-1453 extract in separate test class

----


> Fragment-Host requirements with version range do not match with FragmentHostCapability
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-1453
>                 URL: https://issues.apache.org/jira/browse/ARIES-1453
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.6
>            Reporter: Tom De Wolf
>            Priority: Blocker
>             Fix For: subsystem-2.0.8
>
>
> According to http://wiki.osgi.org/wiki/Fragment-Host we can specify Fragment-host headers using version ranges. When we do that the requirement no longer matches on the capabilities in the aries subsystem implementation. It results in the errors below.
> Reason for this is that the FragmentHostCapability only uses 'string' attributes which results in versions "9.6.1" and "10.0.0" being compared as if "10.0.0" is earlier than "9.6.1". A bundle host with version 9.6.1 therefore does not match the version range [9.6.0, 10.0.0). It should not do string comparison but have a real 'Version' instance to compare with.
> {code}
> Error installing subsystem: org.osgi.service.subsystem.SubsystemException: org.osgi.service.resolver.ResolutionException: Unable to resolve /var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar: missing requirement org.apache.aries.subsystem.core.archive.FragmentHostRequirement: namespace=osgi.wiring.host, attributes={}, directives={filter=(&(osgi.wiring.host=be.aca.ui-framework)(&(bundle-version>=9.3.0)(!(bundle-version>=10.0.0))))}, resource=/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar
> g! at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
> at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
> at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.osgi.service.subsystem.SubsystemException: org.osgi.service.resolver.ResolutionException: Unable to resolve /var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar: missing requirement org.apache.aries.subsystem.core.archive.FragmentHostRequirement: namespace=osgi.wiring.host, attributes={}, directives={filter=(&(osgi.wiring.host=be.aca.ui-framework)(&(bundle-version>=9.3.0)(!(bundle-version>=10.0.0))))}, resource=/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar
> at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:395)
> at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:356)
> at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:98)
> at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:90)
> 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:646)
> at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:690)
> at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:278)
> at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:65)
> at be.aca.subsystem.internal.DefaultSubsystemService.installFromRepo(DefaultSubsystemService.java:86)
> at be.aca.subsystem.internal.DefaultSubsystemService.install(DefaultSubsystemService.java:47)
> ... 30 more
> Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve /var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar: missing requirement org.apache.aries.subsystem.core.archive.FragmentHostRequirement: namespace=osgi.wiring.host, attributes={}, directives={filter=(&(osgi.wiring.host=be.aca.ui-framework)(&(bundle-version>=9.3.0)(!(bundle-version>=10.0.0))))}, resource=/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract8702582580344751163.zip/ui-main-13.3.1.jar
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)
> at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)
> at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)
> at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:373)
> ... 42 more
> {code}



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