JBAS014120: Error invoking timeout for timer: ... javax.ejb.NoSuchObjectLocalException: JBAS014469: Timer was canceled in JBoss EAP 6
Issue
- We are getting this error when our EJB Timer fires:
22:05:51,100 INFO [com.jboss.examples.timers.SingletonTimer] (EJB default - 1) Cancel All Timers
22:05:51,168 ERROR [org.jboss.as.ejb3] (EJB default - 1) JBAS014120: Error invoking timeout for timer: [id=336c15e0-10db-4f27-8528-29566b73c52b timedObjectId=ee6-singleton-timer.ee6-singleton-timer.EE6ExampleSingletonTimer auto-timer?:false persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@49f3c84b initialExpiration=Thu Mar 19 22:05:48 CDT 2015 intervalDuration(in milli sec)=0 nextExpiration=null timerState=CANCELED info=1]: javax.ejb.NoSuchObjectLocalException: JBAS014469: Timer was canceled
at org.jboss.as.ejb3.timerservice.TimerImpl.assertTimerState(TimerImpl.java:502) [jboss-as-ejb3-7.4.3.Final-redhat-2.jar:7.4.3.Final-redhat-2]
at org.jboss.as.ejb3.timerservice.TimerImpl.getInfo(TimerImpl.java:277) [jboss-as-ejb3-7.4.3.Final-redhat-2.jar:7.4.3.Final-redhat-2]
at com.jboss.examples.ee6.ejb.EE6ExampleSingletonTimer.timeout(EE6ExampleSingletonTimer.java:81)
...
Our Timer EJB looks like this below, and there are multiple timers scheduled for this bean:
@Singleton
public class SingletonTimer implements SingletonTimerRemote {
public void scheduleTimer(Date date) {
timerService.createSingleActionTimer(date, null);
}
@Timeout
public void timeout(Timer timer) {
...
}
public void cancelAllTimers() {
log.info("Cancel All Timers");
for (Timer timer : timerService.getTimers())
timer.cancel();
}
}
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.