You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jean-Guy Speton (JIRA)" <ji...@apache.org> on 2010/04/14 02:53:54 UTC

[jira] Created: (FELIX-2281) Bundle id order affects fragment resolution success

Bundle id order affects fragment resolution success
---------------------------------------------------

                 Key: FELIX-2281
                 URL: https://issues.apache.org/jira/browse/FELIX-2281
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-2.0.4
         Environment: Mac OS 10.5.8, Java 1.5_22
            Reporter: Jean-Guy Speton


Create two host bundles and two fragments with the following headers:

> cat host1.man
Bundle-ManifestVersion: 2
Bundle-SymbolicName: host
Export-Package: foo
Bundle-Version: 1

> cat host2.man
Bundle-ManifestVersion: 2
Bundle-SymbolicName: host
Export-Package: foo
Bundle-Version: 2

> cat frag1.man
Bundle-ManifestVersion: 2
Bundle-SymbolicName: fragment
Bundle-Version: 1
Fragment-Host: host; bundle-version="[1,1]"
Export-Package: bar

> cat frag2.man
Bundle-ManifestVersion: 2
Bundle-SymbolicName: fragment
Bundle-Version: 2
Fragment-Host: host; bundle-version="[2,2]"
Export-Package: bar

When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.0.4)
[   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[  59] [Installed  ] [    1] host (1)
[  60] [Installed  ] [    1] host (2)
[  61] [Installed  ] [    1] fragment (2)
[  62] [Installed  ] [    1] fragment (1)
-> resolve 62
-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.0.4)
[   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[  59] [Resolved   ] [    1] host (1)
[  60] [Installed  ] [    1] host (2)
[  61] [Installed  ] [    1] fragment (2)
[  62] [Installed  ] [    1] fragment (1)
-> resolve 62
WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))


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

        

[jira] Commented: (FELIX-2281) Bundle id order affects fragment resolution success

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858628#action_12858628 ] 

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

Verified. I will look into a fix, but it will likely be in the 3.0 release and not a 2.0.x release...unless it is absolutely critical.

> Bundle id order affects fragment resolution success
> ---------------------------------------------------
>
>                 Key: FELIX-2281
>                 URL: https://issues.apache.org/jira/browse/FELIX-2281
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.4
>         Environment: Mac OS 10.5.8, Java 1.5_22
>            Reporter: Jean-Guy Speton
>             Fix For: felix-3.0.0
>
>
> Create two host bundles and two fragments with the following headers:
> > cat host1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 1
> > cat host2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 2
> > cat frag1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 1
> Fragment-Host: host; bundle-version="[1,1]"
> Export-Package: bar
> > cat frag2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 2
> Fragment-Host: host; bundle-version="[2,2]"
> Export-Package: bar
> When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Installed  ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Resolved   ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2281) Bundle id order affects fragment resolution success

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862850#action_12862850 ] 

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

FYI: There was a logic bug in my patch, it should be fixed now. Deploying new snapshot shortly.

> Bundle id order affects fragment resolution success
> ---------------------------------------------------
>
>                 Key: FELIX-2281
>                 URL: https://issues.apache.org/jira/browse/FELIX-2281
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.4
>         Environment: Mac OS 10.5.8, Java 1.5_22
>            Reporter: Jean-Guy Speton
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>
> Create two host bundles and two fragments with the following headers:
> > cat host1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 1
> > cat host2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 2
> > cat frag1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 1
> Fragment-Host: host; bundle-version="[1,1]"
> Export-Package: bar
> > cat frag2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 2
> Fragment-Host: host; bundle-version="[2,2]"
> Export-Package: bar
> When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Installed  ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Resolved   ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2281) Bundle id order affects fragment resolution success

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-2281.
------------------------------------

      Assignee: Richard S. Hall
    Resolution: Fixed

The routine for attaching fragments was only considering the fragment with the highest version, not the one with the highest matching version. Thus, we'd miss lower versions if there was a higher, non-matching fragment version. This appears to be working in trunk now:

-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.1.0.SNAPSHOT)
[   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
[   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
[   4] [Installed  ] [    1] host (1.0.0)
[   5] [Installed  ] [    1] host (2.0.0)
[   6] [Installed  ] [    1] fragment (2.0.0)
[   7] [Installed  ] [    1] fragment (1.0.0)
-> resolve 7
DEBUG: FRAGMENT WIRE: 7.0 -> hosted by -> 4.0
-> 

Please close if you are satisfied. Thanks for reporting.

> Bundle id order affects fragment resolution success
> ---------------------------------------------------
>
>                 Key: FELIX-2281
>                 URL: https://issues.apache.org/jira/browse/FELIX-2281
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.4
>         Environment: Mac OS 10.5.8, Java 1.5_22
>            Reporter: Jean-Guy Speton
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>
> Create two host bundles and two fragments with the following headers:
> > cat host1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 1
> > cat host2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 2
> > cat frag1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 1
> Fragment-Host: host; bundle-version="[1,1]"
> Export-Package: bar
> > cat frag2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 2
> Fragment-Host: host; bundle-version="[2,2]"
> Export-Package: bar
> When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Installed  ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Resolved   ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2281) Bundle id order affects fragment resolution success

Posted by "Jean-Guy Speton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Guy Speton closed FELIX-2281.
----------------------------------


Thanks!

> Bundle id order affects fragment resolution success
> ---------------------------------------------------
>
>                 Key: FELIX-2281
>                 URL: https://issues.apache.org/jira/browse/FELIX-2281
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.4
>         Environment: Mac OS 10.5.8, Java 1.5_22
>            Reporter: Jean-Guy Speton
>            Assignee: Richard S. Hall
>             Fix For: felix-3.0.0
>
>
> Create two host bundles and two fragments with the following headers:
> > cat host1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 1
> > cat host2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 2
> > cat frag1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 1
> Fragment-Host: host; bundle-version="[1,1]"
> Export-Package: bar
> > cat frag2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 2
> Fragment-Host: host; bundle-version="[2,2]"
> Export-Package: bar
> When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Installed  ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Resolved   ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2281) Bundle id order affects fragment resolution success

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2281:
-----------------------------------

    Fix Version/s: felix-3.0.0

> Bundle id order affects fragment resolution success
> ---------------------------------------------------
>
>                 Key: FELIX-2281
>                 URL: https://issues.apache.org/jira/browse/FELIX-2281
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-2.0.4
>         Environment: Mac OS 10.5.8, Java 1.5_22
>            Reporter: Jean-Guy Speton
>             Fix For: felix-3.0.0
>
>
> Create two host bundles and two fragments with the following headers:
> > cat host1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 1
> > cat host2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: host
> Export-Package: foo
> Bundle-Version: 2
> > cat frag1.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 1
> Fragment-Host: host; bundle-version="[1,1]"
> Export-Package: bar
> > cat frag2.man
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: fragment
> Bundle-Version: 2
> Fragment-Host: host; bundle-version="[2,2]"
> Export-Package: bar
> When frag1 is loaded before frag2, it successfully resolves to host1.  When frag1 is loaded after frag2, it fails to resolve (although the first attempt at resolution does not display an error):
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Installed  ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.4)
> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
> [   2] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   3] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
> [  59] [Resolved   ] [    1] host (1)
> [  60] [Installed  ] [    1] host (2)
> [  61] [Installed  ] [    1] fragment (2)
> [  62] [Installed  ] [    1] fragment (1)
> -> resolve 62
> WARNING: Unable to resolve bundle 62 (org.osgi.framework.BundleException: Unresolved constraint in bundle fragment [62]: host; (&(bundle-symbolic-name=host)(bundle-version>=1.0.0)(bundle-version<=1.0.0)))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.