Exception on Timer EJB
arun168403 Sep 19, 2013 1:18 AMI have a SLSB as below which implements Timer interface:
public class EzSetupEJB implements javax.ejb.SessionBean { ……. …. @Resource private TimerService timerService; public void onDeployment() { s_log.info("STARTUP SEQUENCE INVOKED"); createTimer(1000, EzSetupTimerInfo.STATE_CREATENE, null); } protected void createTimer(long expiration, int ezSetupState, String userLabel) { s_log.info("CreateTimer invoked!"); Timer t = timerService.createTimer(expiration,new String(""+ezSetupState)); } @Timeout @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public void checkStatus(Timer timer) { …… } }
I’m trying to invoke the onDeployment() method from a remote client to initiate the timer. But I’m getting an exception as below:
Could you kindly help on this:
02:09:35,515 INFO [com.alcatel.trace] (EJB default - 1) STARTUP SEQUENCE INVOKED 02:09:35,515 INFO [com.alcatel.trace] (EJB default - 1) CreateTimer invoked! 01:33:43,343 INFO [org.jboss.as.naming] (Remoting "ocs" task-2) JBAS011806: Channel end notification received, closing channel Channel ID 1c619b9b (inbound) of Remoting connection 019ca39b to null 01:33:44,343 ERROR [org.jboss.as.ejb3] (EJB default - 2) JBAS014120: Error invoking timeout for timer: [id=9367a316-db53-4e2b-a6ce-ee40e705deb8 timedObjectId=gem.ejb-jar-ezsetup.EzSetup auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@19ae4 initialExpiration=Thu Sep 19 01:33:44 BRT 2013 intervalDuration(in milli sec)=0 nextExpiration=null timerState=IN_TIMEOUT: java.lang.RuntimeException: JBAS014481: Cannot invoke timeout method because method null is not a timeout method at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:81) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:111) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.task.TimerTask.callTimeout(TimerTask.java:157) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:132) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA] 01:33:44,343 INFO [org.jboss.as.ejb3] (EJB default - 2) JBAS014121: Timer: [id=9367a316-db53-4e2b-a6ce-ee40e705deb8 timedObjectId=gem.ejb-jar-ezsetup.EzSetup auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@19ae4 initialExpiration=Thu Sep 19 01:33:44 BRT 2013 intervalDuration(in milli sec)=0 nextExpiration=null timerState=IN_TIMEOUT will be retried 01:33:44,343 INFO [org.jboss.as.ejb3] (EJB default - 2) JBAS014123: Retrying timeout for timer: [id=9367a316-db53-4e2b-a6ce-ee40e705deb8 timedObjectId=gem.ejb-jar-ezsetup.EzSetup auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@19ae4 initialExpiration=Thu Sep 19 01:33:44 BRT 2013 intervalDuration(in milli sec)=0 nextExpiration=null timerState=IN_TIMEOUT 01:33:44,390 ERROR [org.jboss.as.ejb3] (EJB default - 2) JBAS014122: Error during retrying timeout for timer: [id=9367a316-db53-4e2b-a6ce-ee40e705deb8 timedObjectId=gem.ejb-jar-ezsetup.EzSetup auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@19ae4 initialExpiration=Thu Sep 19 01:33:44 BRT 2013 intervalDuration(in milli sec)=0 nextExpiration=null timerState=RETRY_TIMEOUT: java.lang.RuntimeException: JBAS014481: Cannot invoke timeout method because method null is not a timeout method at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:81) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:111) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.task.TimerTask.callTimeout(TimerTask.java:157) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:132) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]