You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "hehe ji (JIRA)" <ji...@apache.org> on 2010/03/16 00:08:27 UTC

[jira] Created: (FELIX-2205) Felix resolver unable to pick up the highest bundle version when exported packages are not versioned

Felix resolver unable to pick up the highest bundle version when exported packages are not versioned
----------------------------------------------------------------------------------------------------

                 Key: FELIX-2205
                 URL: https://issues.apache.org/jira/browse/FELIX-2205
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
    Affects Versions: bundlerepository-1.4.3
            Reporter: hehe ji


I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.

bundle1.jar

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: a.b.c
Bundle-Version: 1.0.0
Bundle-Vendor: ABC
Require-Bundle: a.b.c.d
Export-Package: a.b.c

bundle2.jar
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: a.b.c.d
Bundle-Version: 1.0.0
Bundle-Vendor: ABC
Export-Package: a.b.c.d


bundle3.jar
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: a.b.c.d
Bundle-Version: 3.0.0
Bundle-Vendor: ABC
Export-Package: a.b.c.d


bundle4.jar
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: a.b.c.d
Bundle-Version: 4.0.0
Bundle-Vendor: ABC
Export-Package: a.b.c.d



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


[jira] Commented: (FELIX-2205) OBR resolver unable to pick up the highest bundle version when exported packages are not versioned

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

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

The issue is that there is no relationship between bundle version and package versions. If I have bundle Foo 1.0.0 and bundle Bar 2.0.0 both of which export org.woz, which provider should I choose? Comparing the bundle versions is meaningless since the bundles do not have the same symbolic name.

If you really want to treat your package versions as if they are in lockstep with your bundle version, you'd be better of explicitly assigning the bundle version number to your package versions. At least then it would be clear what you are trying to achieve. Your proposal leaves your package versions at 0.0.0 but hopes that they get handled as being the same as the bundle version. Keeping this desire implicit seems to be a recipe for disaster, especially since the specification defines different priority rules for the framework resolver.

> OBR resolver unable to pick up the highest bundle version when exported packages are not versioned
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) Felix resolver unable to pick up the highest bundle version when exported packages are not versioned

Posted by "Emily Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846158#action_12846158 ] 

Emily Jiang commented on FELIX-2205:
------------------------------------

I would think the following behavior is correct.

If the package is listed under import-packages, the package with the highest version should be picked up. When there are multiple packages with the same version, the bundle with the highest bundle version should be picked.

If a bundle is listed in Required-Bundle and there are multiple bundles with the same symbolic name, the bundle with the highest bundle version should be picked though.

Thanks
Emily

> Felix resolver unable to pick up the highest bundle version when exported packages are not versioned
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) Felix resolver unable to pick up the highest bundle version when exported packages are not versioned

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

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

It is not clear if this is a bug or not. Technically, a package without a version has a default version of 0.0.0, so in this case all packages have the same version (i.e., 0.0.0), which makes any choice the correct one.

> Felix resolver unable to pick up the highest bundle version when exported packages are not versioned
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: hehe ji
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) Felix resolver unable to pick up the highest bundle version when exported packages are not versioned

Posted by "hehe ji (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845588#action_12845588 ] 

hehe ji commented on FELIX-2205:
--------------------------------

The resolver is able to pick up the bundle4 if the exported package is versioned same as the bundle version. e.g.
bundle4.jar
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: a.b.c.d
Bundle-Version: 4.0.0
Bundle-Vendor: ABC
Export-Package: a.b.c.d;version=4.0

> Felix resolver unable to pick up the highest bundle version when exported packages are not versioned
> ----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: hehe ji
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Updated: (FELIX-2205) OBR resolver unable to pick up the highest bundle version when exported packages are not versioned

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

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

    Summary: OBR resolver unable to pick up the highest bundle version when exported packages are not versioned  (was: Felix resolver unable to pick up the highest bundle version when exported packages are not versioned)

> OBR resolver unable to pick up the highest bundle version when exported packages are not versioned
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) OBR resolver unable to pick up the highest bundle version when exported packages are not versioned

Posted by "Emily Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846605#action_12846605 ] 

Emily Jiang commented on FELIX-2205:
------------------------------------

Richard, I will agree with your above comment for package import. As for the MANIFEST header Require-Bundle, I think the resolver should find the bundles with the specified symbolic name. The highest bundle version should be picked.

For an example,

If the manifest has the following line:


Require-Bundle: a.b.c.d

If there are multiple bundles called a.b.c.d, I would expect the highest bundle version should be picked by the resolver.

> OBR resolver unable to pick up the highest bundle version when exported packages are not versioned
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) OBR resolver unable to pick up the highest bundle version when exported packages are not versioned

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

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

I would expect it to select the highest version candidate for Require-Bundle too. If you look at ResolverImpl.getBestCandidate(), it attempts to select the candidate with the highest version. It is possible there is a bug in there.

> OBR resolver unable to pick up the highest bundle version when exported packages are not versioned
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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


[jira] Commented: (FELIX-2205) OBR resolver unable to pick up the highest bundle version when exported packages are not versioned

Posted by "Emily Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850564#action_12850564 ] 

Emily Jiang commented on FELIX-2205:
------------------------------------

Any news about this issue? Please let me know if you need any more information.
Thanks
Emily

> OBR resolver unable to pick up the highest bundle version when exported packages are not versioned
> --------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-2205
>                 URL: https://issues.apache.org/jira/browse/FELIX-2205
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>            Reporter: Emily Jiang
>
> I have three bundles that have the same symbolic names with different bundle version and export the same package. The package is not versioned. The resolver is unable to pick up the highest version of bundles, which is the bundle4. It randomly picks one bundle.
> bundle1.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Require-Bundle: a.b.c.d
> Export-Package: a.b.c
> bundle2.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 1.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle3.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 3.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d
> bundle4.jar
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Bundle Plug-in
> Bundle-SymbolicName: a.b.c.d
> Bundle-Version: 4.0.0
> Bundle-Vendor: ABC
> Export-Package: a.b.c.d

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