[jira] [Commented] (SLING-5382) DiscoveryServiceImpl#doUpdateProperties may fail due to a NPE

2016-01-23 Thread Sham (JIRA)

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

Sham commented on SLING-5382:
-

That's correct. Easy to reproduce. Stop or disable the Config component and try 
to stop the server. Get the same message.   

Out of the context strange issue i am facing is if server stoped with npe on 
discoveryservice matching the stacktrace reported in this jira. On next start, 
any code deploy (fragement bundle) make aem unusable.  Currently as a trial 
self modified the code to handle this npe & code deploy sounds sussesfully.  
Will be nice if this issue get fixed offically to carry fwd negative effect 
down the stream. 

> DiscoveryServiceImpl#doUpdateProperties may fail due to a NPE 
> --
>
> Key: SLING-5382
> URL: https://issues.apache.org/jira/browse/SLING-5382
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Oak 1.2.0
>Reporter: Timothee Maret
>
> Observed
> {code}
> 09.12.2015 14:19:13.175 *ERROR* [FelixStartLevel] 
> org.apache.sling.discovery.oak 
> [org.apache.sling.discovery.oak.OakDiscoveryService(186)] The 
> updatedPropertyProvider method has thrown an exception 
> (java.lang.NullPointerException)
> java.lang.NullPointerException: null
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.doUpdateProperties(OakDiscoveryService.java:476)
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.bindPropertyProviderInteral(OakDiscoveryService.java:403)
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.updatedPropertyProvider(OakDiscoveryService.java:417)
>   at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
>   at 
> org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager.invokeUpdatedMethod(DependencyManager.java:1706)
>   at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUpdatedMethod(SingleComponentManager.java:381)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.modifiedService(DependencyManager.java:349)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.modifiedService(DependencyManager.java:295)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:1228)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:1136)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:884)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
>   at 
> org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
>   at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
>   at org.apache.felix.framework.Felix.access$000(Felix.java:106)
>   at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:420)
>   at 
> org.apache.felix.framework.ServiceRegistry.servicePropertiesModified(ServiceRegistry.java:571)
>   at 
> org.apache.felix.framework.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:131)
>   at 
> org.apache.sling.event.impl.jobs.JobConsumerManager.unbindService(JobConsumerManager.java:364)
>   at 
> org.apache.sling.event.impl.jobs.JobConsumerManager.unbindJobConsumer(JobConsumerManager.java:262)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.i

[jira] [Commented] (SLING-5382) DiscoveryServiceImpl#doUpdateProperties may fail due to a NPE

2015-12-16 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on SLING-5382:
---

The {{config}} field should be checked for {{null}} as it could be that the 
framework binds a {{PropertyProvider}} instance before the {{config}} (thus 
before the component is active).

{code}
Resource myInstance = ResourceHelper
.getOrCreateResource(
resourceResolver,
config.getClusterInstancesPath()
+ "/" + slingId + "/properties");
{code}

> DiscoveryServiceImpl#doUpdateProperties may fail due to a NPE 
> --
>
> Key: SLING-5382
> URL: https://issues.apache.org/jira/browse/SLING-5382
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Oak 1.2.0
>Reporter: Timothee Maret
>
> Observed
> {code}
> 09.12.2015 14:19:13.175 *ERROR* [FelixStartLevel] 
> org.apache.sling.discovery.oak 
> [org.apache.sling.discovery.oak.OakDiscoveryService(186)] The 
> updatedPropertyProvider method has thrown an exception 
> (java.lang.NullPointerException)
> java.lang.NullPointerException: null
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.doUpdateProperties(OakDiscoveryService.java:476)
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.bindPropertyProviderInteral(OakDiscoveryService.java:403)
>   at 
> org.apache.sling.discovery.oak.OakDiscoveryService.updatedPropertyProvider(OakDiscoveryService.java:417)
>   at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
>   at 
> org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager.invokeUpdatedMethod(DependencyManager.java:1706)
>   at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUpdatedMethod(SingleComponentManager.java:381)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.modifiedService(DependencyManager.java:349)
>   at 
> org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.modifiedService(DependencyManager.java:295)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:1228)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:1136)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:884)
>   at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
>   at 
> org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
>   at 
> org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
>   at 
> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
>   at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
>   at org.apache.felix.framework.Felix.access$000(Felix.java:106)
>   at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:420)
>   at 
> org.apache.felix.framework.ServiceRegistry.servicePropertiesModified(ServiceRegistry.java:571)
>   at 
> org.apache.felix.framework.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:131)
>   at 
> org.apache.sling.event.impl.jobs.JobConsumerManager.unbindService(JobConsumerManager.java:364)
>   at 
> org.apache.sling.event.impl.jobs.JobConsumerManager.unbindJobConsumer(JobConsumerManager.java:262)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
>   at 
> org.apache