You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2016/03/09 16:36:41 UTC

[jira] [Resolved] (ARIES-1498) NullPointerException NPE Blueprint Container AbstractServiceReferenceRecipe setSatisfied

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

Guillaume Nodet resolved ARIES-1498.
------------------------------------
       Resolution: Fixed
         Assignee: Guillaume Nodet
    Fix Version/s: blueprint-core-1.6.0

I think the setSatisfied might be called after stop() because I'm not sure about the concurrency in the OSGi framework for the ServiceListener being called and its removal.
I've added the volatile keyword and also an additional check.

> NullPointerException NPE Blueprint Container AbstractServiceReferenceRecipe setSatisfied
> ----------------------------------------------------------------------------------------
>
>                 Key: ARIES-1498
>                 URL: https://issues.apache.org/jira/browse/ARIES-1498
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.5.0
>            Reporter: John Ross
>            Assignee: Guillaume Nodet
>             Fix For: blueprint-core-1.6.0
>
>
> [2/28/16 6:12:25:150 EST] 00000010 LogService-115-BPCompWABClient                               E CWWKE0701E: FrameworkEvent ERROR Bundle:BPCompWABClient(id=115) java.lang.NullPointerException
> 	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.setSatisfied(AbstractServiceReferenceRecipe.java:419)
> 	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceAdded(AbstractServiceReferenceRecipe.java:361)
> 	at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceChanged(AbstractServiceReferenceRecipe.java:341)
> 	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
> 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> 	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:485)
> 	at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:193)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:739)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:406)
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:275)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:274)
> 	at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
> 	at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:274)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:190)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
> 	at java.lang.Thread.run(Thread.java:798)
>  Event:org.osgi.framework.FrameworkEvent[source=BPCompWABClient_1.0.0 [115]] 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)