[ 
https://issues.apache.org/jira/browse/ARIES-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919955#action_12919955
 ] 

Guillaume Nodet commented on ARIES-441:
---------------------------------------

I think the problem happens under the following conditions:
  * the persistent id has no configuration in the ConfigAdmin
  * there are multiple ManagedService(s) registered for the same pid

That's my analysis looking at the code at [1].
I think you should ask the equinox guys about that but I don't have any work 
around for that unfortunately.


[1] 
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ManagedServiceTracker.java?view=annotate&root=RT_Project

> NullPointerException when cm:property-placeholder used with a non existant 
> persistent id
> ----------------------------------------------------------------------------------------
>
>                 Key: ARIES-441
>                 URL: https://issues.apache.org/jira/browse/ARIES-441
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: 0.3
>            Reporter: Craig Muchinsky
>
> When cm:property-placeholder is used and the persistence id specified doesn't 
> exist, the following NPE is thrown:
> java.lang.NullPointerException
>       at 
> org.eclipse.equinox.internal.cm.ManagedServiceTracker.add(ManagedServiceTracker.java:115)
>       at 
> org.eclipse.equinox.internal.cm.ManagedServiceTracker.addingService(ManagedServiceTracker.java:70)
>       at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
>       at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
>       at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
>       at 
> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
>       at 
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
>       at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)
>       at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
>       at 
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
>       at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)
>       at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry$1.run(ServiceRegistry.java:715)
>       at 
> java.security.AccessController.doPrivileged(AccessController.java:202)
>       at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:713)
>       at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
>       at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206)
>       at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)
>       at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525)
>       at 
> org.apache.aries.blueprint.compendium.cm.ManagedObjectManager.register(ManagedObjectManager.java:49)
>       at 
> org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder.init(CmPropertyPlaceholder.java:103)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:600)
>       at 
> org.apache.aries.blueprint.utils.ReflectionUtils$1.run(ReflectionUtils.java:226)
>       at 
> java.security.AccessController.doPrivileged(AccessController.java:284)
>       at 
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:224)
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:829)
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:634)
>       at 
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:729)
>       at 
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
>       at 
> org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:492)
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:313)
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:150)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:110)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:219)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
>       at java.lang.Thread.run(Thread.java:736)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to