[
https://issues.apache.org/jira/browse/FELIX-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669555#comment-13669555
]
David Jencks commented on FELIX-4088:
-------------------------------------
1. can you try using the current 1.8.0-SNAPSHOT ds? 1.6.0 isn't going to have
anything fixed.
2. It looks like you've interposed some paremus code in between DS and the
felix framework (at
com.paremus.frameworkintercept.DelegatingServiceRegistration.unregister(DelegatingServiceRegistration.java:37)
). Can this be causing the problem? For instance maybe the bundle stopping
event isn't getting propagated correctly to DS due to wrapping.
3. do you really mean "This configuration is picked up by DS to create a new
Service using a ManagedServiceFactory"? Or do you mean the configuration has a
pid or factory pid matching a DS component so DS uses the configuration to
configure a component, sort of like a MSF?
>From your description I'd expect that the bundle stopping event (synchronous)
>would be seen by DS and that would unregister the services for the bundle so
>that by the time the async configuration deleted event arrived there would be
>no more services for the bundle. Can you make sure you have ds.loglevel=DEBUG
>and look in your logs to see if there's evidence of this happening?
> 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