Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2281

Bundle id order affects fragment resolution success

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: framework-2.0.4
    • Fix Version/s: framework-3.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Mac OS 10.5.8, Java 1.5_22

      Description

      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)))

        Attachments

          Activity

            People

            • Assignee:
              rickhall Richard S. Hall
              Reporter:
              jspeton Jean-Guy Speton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: