Stefan Egli created SLING-4224:
----------------------------------
Summary: Avoid NPE after HeartbeatHandler deactivation
Key: SLING-4224
URL: https://issues.apache.org/jira/browse/SLING-4224
Project: Sling
Issue Type: Bug
Components: Extensions
Affects Versions: Discovery Impl 1.0.12
Reporter: Stefan Egli
Priority: Minor
Fix For: Discovery Impl 1.0.14
The following order of messages, including a NPE, where witnessed:
{code}
27.11.2014 17:04:53.913 *INFO* [FelixShutdown] org.apache.felix.framework
BundleEvent STOPPING
...
27.11.2014 17:05:07.080 *INFO* [FelixStartLevel]
org.apache.sling.discovery.impl Service
[org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler,3149]
ServiceEvent UNREGISTERING
...
27.11.2014 17:05:07.094 *ERROR* [pool-9-thread-1]
org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job
execution of
org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler@4d2581b9 :
null
java.lang.NullPointerException: null
at
org.apache.sling.discovery.impl.cluster.voting.VotingHelper.listOpenNonWinningVotings(VotingHelper.java:53)
at
org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.doCheckView(HeartbeatHandler.java:441)
at
org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.checkView(HeartbeatHandler.java:409)
at
org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler.run(HeartbeatHandler.java:212)
at
org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
This indicates, that the HeartbeatHandler is executing the checkView method
even after deactivation - thus having the config null - thus running into a NPE.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)