You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Timothy Ward (JIRA)" <ji...@apache.org> on 2013/06/03 19:17:21 UTC

[jira] [Commented] (FELIX-4088) NPE from SCR service unregistration

    [ https://issues.apache.org/jira/browse/FELIX-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13673330#comment-13673330 ] 

Timothy Ward commented on FELIX-4088:
-------------------------------------

Hi [~djencks] - I have run the scenario again with a local build of the latest SCR code and I'm no longer seeing errors. Previously they were occurring about 75% of the time, and I've run through 10 times since the update. This obviously doesn't guarantee that there isn't another race condition in the framework, but the fix you added has definitely improved things.
                
> NPE from SCR service unregistration
> -----------------------------------
>
>                 Key: FELIX-4088
>                 URL: https://issues.apache.org/jira/browse/FELIX-4088
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin, Declarative Services (SCR), Framework
>    Affects Versions: framework-4.2.0,  configadmin-1.2.8,  scr-1.6.0
>         Environment: MacOSX 8 processors
>            Reporter: Timothy Ward
>
> When uninstalling a set of bundles I get the following exception.
> ERROR: Bundle com.paremus.dosgi.topologymanager [101] EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
> java.lang.NullPointerException
> 	at org.apache.felix.framework.util.Util.getWire(Util.java:335)
> 	at org.apache.felix.framework.ServiceRegistrationImpl$ServiceReferenceImpl.isAssignableTo(ServiceRegistrationImpl.java:493)
> 	at org.apache.felix.framework.util.Util.isServiceAssignable(Util.java:280)
> 	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:916)
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
> 	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
> 	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4401)
> 	at org.apache.felix.framework.Felix.access$000(Felix.java:74)
> 	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
> 	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:151)
> 	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127)
> 	at com.paremus.frameworkintercept.DelegatingServiceRegistration.unregister(DelegatingServiceRegistration.java:37)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterComponentService(AbstractComponentManager.java:470)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager$Satisfied.deactivate(AbstractComponentManager.java:1074)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:338)
> 	at org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:414)
> 	at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationDeleted(ConfiguredComponentHolder.java:152)
> 	at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:247)
> 	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1832)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
> 	at java.lang.Thread.run(Thread.java:722)
> ERROR: Bundle org.cauldron.newton.management.monitor [85] EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
> java.lang.NullPointerException
> 	at org.apache.felix.framework.util.Util.getWire(Util.java:335)
> 	at org.apache.felix.framework.ServiceRegistrationImpl$ServiceReferenceImpl.isAssignableTo(ServiceRegistrationImpl.java:493)
> 	at org.apache.felix.framework.util.Util.isServiceAssignable(Util.java:280)
> 	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:916)
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
> 	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
> 	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4401)
> 	at org.apache.felix.framework.Felix.access$000(Felix.java:74)
> 	at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
> 	at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:151)
> 	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127)
> 	at com.paremus.frameworkintercept.DelegatingServiceRegistration.unregister(DelegatingServiceRegistration.java:37)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterComponentService(AbstractComponentManager.java:470)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager$Satisfied.deactivate(AbstractComponentManager.java:1074)
> 	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:338)
> 	at org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:414)
> 	at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationDeleted(ConfiguredComponentHolder.java:152)
> 	at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:247)
> 	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1832)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
> 	at java.lang.Thread.run(Thread.java:722)
> One of the bundles is an extender, that publishes a Configuration using Config Admin. This configuration is picked up by DS to create a new Service using a ManagedServiceFactory.
> At some point in the teardown I seem to be in the state where:
> 1. The configuration is being deleted because the target bundle is being uninstalled
> 2. The Bundle containing the SCR component is being uninstalled
> 3. SCR is attempting to unregister the managed service because of the asynchronous notification from config admin.
> I'm not sure whether the fault lies with the core framework or with scr, or with config admin. My guess is that SCR is at fault for trying to unregister a service for an uninstalled bundle, but that the framework shouldn't be blowing up either. Config Admin is probably an innocent bystander. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira