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

SCR should protect against unregistered IllegalStateException for its ConfigurationListener registrations

    XMLWordPrintableJSON

Details

    Description

      The following IllegalStateException should be caught and ignored by SCR

      ERROR: Bundle adeptj-modules-data-mongodb [26] EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Service already unregistered.)
      java.lang.IllegalStateException: Service already unregistered.
      at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:141)
      at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.dereference(RegionConfigurationSupport.java:141)
      at org.apache.felix.scr.impl.ComponentRegistry.unregisterRegionConfigurationSupport(ComponentRegistry.java:698)
      at org.apache.felix.scr.impl.BundleComponentActivator.unsetRegionConfigurationSupport(BundleComponentActivator.java:755)
      at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.removedService(ConfigAdminTracker.java:82)
      at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.removedService(ConfigAdminTracker.java:41)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:969)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:871)
      at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
      at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:911)
      at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
      at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
      at org.apache.felix.framework.Felix.access$000(Felix.java:112)
      at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:434)
      at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170)
      at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:145)
      at org.apache.felix.cm.impl.ConfigurationManager.stop(ConfigurationManager.java:248)
      at org.apache.felix.cm.impl.ConfigurationAdminStarter.deactivate(ConfigurationAdminStarter.java:95)
      at org.apache.felix.cm.impl.ConfigurationAdminStarter.updatePluginsSet(ConfigurationAdminStarter.java:177)
      at org.apache.felix.cm.impl.RequiredConfigurationPluginTracker$2.run(RequiredConfigurationPluginTracker.java:155)
      at org.apache.felix.cm.impl.ActivatorWorkerQueue.run(ActivatorWorkerQueue.java:82)
      at java.base/java.lang.Thread.run(Thread.java:834)
      ERROR Error processing task
      java.lang.IllegalStateException: Invalid BundleContext.
      at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:491)
      at org.apache.felix.framework.BundleContextImpl.removeBundleListener(BundleContextImpl.java:215)
      at org.apache.felix.cm.impl.ConfigurationManager.stop(ConfigurationManager.java:256)
      at org.apache.felix.cm.impl.ConfigurationAdminStarter.deactivate(ConfigurationAdminStarter.java:95)
      at org.apache.felix.cm.impl.ConfigurationAdminStarter.updatePluginsSet(ConfigurationAdminStarter.java:177)
      at org.apache.felix.cm.impl.RequiredConfigurationPluginTracker$2.run(RequiredConfigurationPluginTracker.java:155)
      at org.apache.felix.cm.impl.ActivatorWorkerQueue.run(ActivatorWorkerQueue.java:82)
      at java.base/java.lang.Thread.run(Thread.java:834)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tjwatson Tom Watson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: