felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3370) Complex Require-Bundle resolver failure
Date Fri, 02 Mar 2012 18:09:59 GMT

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

Richard S. Hall commented on FELIX-3370:
----------------------------------------

I don't think you were reporting this against framework, but I tried it on framework and came
up with the correct result:

g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.1.0.SNAPSHOT)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
    2|Active     |    1|Apache Felix Gogo Command (0.12.0)
    3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
    4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
    5|Installed  |    1|B (0.0.0)
    6|Installed  |    1|C (0.0.0)
    7|Installed  |    1|D (0.0.0)
    8|Installed  |    1|E (0.0.0)
g! resolve 8
DEBUG: Candidate permutation failed due to a conflict between imports; will try another if
possible. (org.apache.felix.framework.resolver.ResolveException: Uses constraint violation.
Unable to resolve bundle revision E [8.0] because it is exposed to package 'resources' from
bundle revisions B [5.0] and C [6.0] via two dependency chains.

Chain 1:
  E [8.0]
    import: (osgi.wiring.package=resources)
     |
    export: osgi.wiring.package=resources
  B [5.0]

Chain 2:
  E [8.0]
    require: (osgi.wiring.bundle=D)
     |
    provide: [7.0] osgi.wiring.bundle; {osgi.wiring.bundle=D, bundle-version=0.0.0}
  D [7.0]
    import: (&(osgi.wiring.package=resources)(bundle-symbolic-name=C))
     |
    export: osgi.wiring.package=resources
  C [6.0])
DEBUG: WIRE: [8.0] osgi.wiring.package; (osgi.wiring.package=resources) -> [6.0]
DEBUG: WIRE: [8.0] osgi.wiring.bundle; (osgi.wiring.bundle=D) -> [7.0]
DEBUG: WIRE: [7.0] osgi.wiring.package; (&(osgi.wiring.package=resources)(bundle-symbolic-name=C))
-> [6.0]
g! 

This shows it saw the conflict and then find the correct solution in the final wires.
                
> Complex Require-Bundle resolver failure
> ---------------------------------------
>
>                 Key: FELIX-3370
>                 URL: https://issues.apache.org/jira/browse/FELIX-3370
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.2
>            Reporter: Thomas Diesler
>            Priority: Minor
>             Fix For: framework-4.2.0
>
>
> Consider this
> {code}
>         // Bundle-SymbolicName: requirebundleB
>         // Export-Package: resources
>         
>         // Bundle-SymbolicName: requirebundleC
>         // Export-Package: resources
>         
>         // Bundle-SymbolicName: requirebundleD
>         // Export-Package: org.jboss.osgi.test.classloading.export;uses:=resources
>         // Import-Package: resources;bundle-symbolic-name=requirebundleC
>         // Bundle-SymbolicName: requirebundleE
>         // Require-Bundle: requirebundleD
>         // Import-Package: resources
>         Wiring wiringE = getWiring(env, resourceE);
>         assertEquals(0, wiringE.getProvidedResourceWires(null).size());
>         assertEquals(1, wiringE.getRequiredResourceWires(WIRING_PACKAGE_NAMESPACE).size());
>         wire = wiringE.getRequiredResourceWires(WIRING_PACKAGE_NAMESPACE).get(0);
>         assertEquals(resourceC, wire.getProvider());
> {code}
> The current implementation of the standalone resolver wires E to B

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message