felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Ward (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FELIX-4088) NPE from SCR service unregistration
Date Wed, 29 May 2013 17:46:21 GMT

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

Timothy Ward updated FELIX-4088:
--------------------------------

          Description: 
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. 
          Environment: MacOSX 8 processors
    Affects Version/s:     (was: scr-1.6.2)
                       framework-4.2.0
                        configadmin-1.2.8
                        scr-1.6.0
    
> 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

Mime
View raw message