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

Installing an fragment bundle without Bundle-ManifestVersion: 2 causes NPE in resolver

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: framework-4.0.2
    • Fix Version/s: framework-4.2.0
    • Component/s: Framework
    • Labels:
      None

      Description

      You may call it a bad bundle (because fragment is a R4 concept as I understand), but if someone forgets to set Bundle-ManifestVersion in a fragment, then Felix 4.0.2 won't start. Just copy the attached f1.jar to bundle/ in a felix installation and start felix to see the following exception:

      ERROR: Bundle org.apache.felix.gogo.shell [5] Error starting file:/space/ss141213/software/felix-framework-4.0.2/bundle/org.apache.felix.gogo.shell-0.10.0.jar (java.lang.NullPointerException)
      java.lang.NullPointerException
      at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getCandidates(StatefulResolver.java:1263)
      at org.apache.felix.framework.resolver.Candidates.populateFragmentOndemand(Candidates.java:347)
      at org.apache.felix.framework.resolver.Candidates.populate(Candidates.java:148)
      at org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:115)
      at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:168)
      at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

        1. f1.jar
          1 kB
          Sanjeeb Kumar Sahoo

          Issue Links

            Activity

              People

              • Assignee:
                rickhall Richard S. Hall
                Reporter:
                sahoo Sanjeeb Kumar Sahoo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: