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

Possible exception when accessing headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • framework-3.0.9
    • framework-4.2.0
    • None
    • None

    Description

      ERROR: Bundle org.ops4j.pax.logging.pax-logging-service [3] EventDispatcher: Error during dispatch. (java.util.NoSuchElementException)
      java.util.NoSuchElementException
      	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796)
      	at java.util.HashMap$ValueIterator.next(HashMap.java:822)
      	at org.apache.felix.framework.BundleImpl.getCurrentLocalizedHeader(BundleImpl.java:334)
      	at org.apache.felix.framework.Felix.getBundleHeaders(Felix.java:1428)
      	at org.apache.felix.framework.BundleImpl.getHeaders(BundleImpl.java:311)
      	at org.apache.felix.framework.BundleImpl.getHeaders(BundleImpl.java:293)
      	at org.ops4j.pax.logging.service.internal.PaxLoggerImpl.setDelegateContext(PaxLoggerImpl.java:101)
      	at org.ops4j.pax.logging.service.internal.PaxLoggerImpl.debug(PaxLoggerImpl.java:131)
      	at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.log(PaxLoggingServiceImpl.java:149)
      	at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.log(PaxLoggingServiceImpl.java:115)
      	at org.ops4j.pax.logging.service.internal.FrameworkHandler.bundleChanged(FrameworkHandler.java:93)
      	at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
      	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
      	at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:949)
      	at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
      	at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
      	at java.lang.Thread.run(Thread.java:680)
      

      The problem happened on 3.0.9 but looking at the getLocalizedHeaders method, nothing has changed so the bug should still be valid for 4.0.x

      I suppose the problem is in the BundleImpl#uninstall method which may clear the cached headers without populating with the default.

      Attachments

        Activity

          People

            rickhall Richard S. Hall
            gnodet Guillaume Nodet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: