Bug 1413033

Summary: [GSS](6.4.z) Persistent calendar timers cause a NullPointerException if the method is removed/renamed from the class
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: EJBAssignee: wfink
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4.10, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.11, 6.4.12CC: bmaxwell, david.lloyd, jbilek, pjurak
Target Milestone: CR1   
Target Release: EAP 6.4.14   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 08:21:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1401452    

Description wfink 2017-01-13 12:49:41 UTC
Description of problem:
If a calendar timer (@Schedule annotated) is renamed in the deployment class
A NullPointerException is thrown:

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."ejb31-timer.jar".component.SimpleScheduleSingletonTimerBean.ejb3.timerService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ejb31-timer.jar".component.SimpleScheduleSingletonTimerBean.ejb3.timerService: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_111]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_111]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_111]
Caused by: java.lang.NullPointerException
	at org.jboss.as.ejb3.timerservice.TimerServiceImpl.doesTimeoutMethodMatch(TimerServiceImpl.java:928)
	at org.jboss.as.ejb3.timerservice.TimerServiceImpl.restoreTimers(TimerServiceImpl.java:679)
	at org.jboss.as.ejb3.timerservice.TimerServiceImpl.start(TimerServiceImpl.java:189)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
	... 3 more



How reproducible:
Deploy a @Schedule timer with methodNameA.
Change the method name and deploy it again
The NPE is shown


Expected results:
Timer should be removed from persistence with a WARN message on deploy

Additional info:
If the class is deployed without any @Schedule annotation and deployed again with one (different method) the error does not appear

Comment 6 Jiří Bílek 2017-02-23 09:08:00 UTC
Verified with EAP 6.4.14.CP.CR1

Comment 7 Petr Penicka 2017-03-23 08:21:37 UTC
Released with EAP 6.4.14 on March 14 (ZIPs) and March 22 (RPMs).