You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Tom Watson (Jira)" <ji...@apache.org> on 2020/10/30 16:34:00 UTC

[jira] [Updated] (FELIX-6351) EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Service already unregistered.)

     [ https://issues.apache.org/jira/browse/FELIX-6351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Watson updated FELIX-6351:
------------------------------
    Fix Version/s: scr-2.1.26

> EventDispatcher: Error during dispatch. (java.lang.IllegalStateException: Service already unregistered.)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-6351
>                 URL: https://issues.apache.org/jira/browse/FELIX-6351
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>            Reporter: Rakesh Kumar
>            Assignee: Tom Watson
>            Priority: Major
>             Fix For: scr-2.1.26
>
>
> I am embedding Felix and in a shutdown hook I am stopping the Felix(with any registered FrameworkListner(s))  but recently started getting below exception.
> I am not sure what causing this but it started appearing when I updated SCR and health check related jars to the latest versions. Please let me know if more information is needed.
>  
> {code:java}
> ^C2020-10-30 05:47:54.769 [AdeptJ Terminator] INFO  com.adeptj.runtime.server.Server - Stopping AdeptJ Runtime!!
> 2020-10-30 05:47:54.773 [AdeptJ Terminator] INFO  com.adeptj.runtime.servlet.BridgeServlet - Destroying BridgeServlet!!
> 2020-10-30 05:47:54.774 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.FrameworkShutdownHandler - Stopping OSGi Framework as ServletContext is being destroyed!!
> 2020-10-30 05:47:54.775 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.ServiceTrackers - Closing EventDispatcherTracker!!
> 2020-10-30 05:47:54.775 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.ServiceTrackers - Closing DispatcherServletTracker!!
> 2020-10-30 05:47:54.775 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.BridgeServiceTracker - Removing OSGi service [Apache Felix Http Dispatcher for bridged request handling]
> 2020-10-30 05:47:54.788 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.DispatcherServletWrapper - Felix DispatcherServlet Destroyed!!
> 2020-10-30 05:47:54.788 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.FrameworkManager - Removing OSGi FrameworkListener!!
> 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)
> 2020-10-30 05:47:54.821 [FelixStartLevel] INFO  org.apache.felix.hc.core.impl.executor.HealthCheckExecutorImpl - HealthCheckExecutor shutdown at start level 20
> 2020-10-30 05:47:54.872 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.FrameworkManager - OSGi FrameworkEvent: [STOPPED]
> 2020-10-30 05:47:54.872 [AdeptJ Terminator] INFO  com.adeptj.runtime.osgi.FrameworkShutdownHandler - OSGi Framework stopped in [97] ms!!
> 2020-10-30 05:47:54.873 [AdeptJ Terminator] INFO  io.undertow - stopping server: Undertow - 2.2.2.Final{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)