0 Replies Latest reply on Oct 31, 2011 9:06 AM by Martin Heinemann

    Timer throws IllegalStateException after undeployment

    Martin Heinemann Newbie

      Hi,

      i created a timer using the @Schedule annotation like in my previuos post @Schedule does not consider timing declaration

      The timer is working now but when i undeploy my war file (containing the timer), my JBoss is throwing IllegalStateExceptions:

       

       

      14:02:00,001 ERROR [org.jboss.as.ejb3.timerservice.mk2.task.TimerTask] (pool-4-thread-2) Error invoking timeout for timer: [id=a27e348a-2d0d-4e63-b415-351349678057 timedObjectId=EMailPoller auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.mk2.TimerServiceImpl@274cbf3f initialExpiration=Mon Oct 31 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Mon Oct 31 14:02:15 CET 2011 timerState=IN_TIMEOUT: java.lang.IllegalStateException: Component is stopped
       at org.jboss.as.ee.component.BasicComponent.waitForComponentStart(BasicComponent.java:98) [jboss-as-ee-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:77) [jboss-as-ee-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.SingletonTimedObjectInvokerImpl.callTimeout(SingletonTimedObjectInvokerImpl.java:46) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.mk2.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:73) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.mk2.task.TimerTask.run(TimerTask.java:119) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_26]
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_26]
       at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_26]
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
       at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
       at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
      
      14:02:00,002 INFO  [org.jboss.as.ejb3.timerservice.mk2.task.TimerTask] (pool-4-thread-2) Timer: [id=a27e348a-2d0d-4e63-b415-351349678057 timedObjectId=EMailPoller auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.mk2.TimerServiceImpl@274cbf3f initialExpiration=Mon Oct 31 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Mon Oct 31 14:02:15 CET 2011 timerState=IN_TIMEOUT will be retried
      14:02:00,002 INFO  [org.jboss.as.ejb3.timerservice.mk2.task.TimerTask] (pool-4-thread-2) Retrying timeout for timer: [id=a27e348a-2d0d-4e63-b415-351349678057 timedObjectId=EMailPoller auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.mk2.TimerServiceImpl@274cbf3f initialExpiration=Mon Oct 31 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Mon Oct 31 14:02:15 CET 2011 timerState=IN_TIMEOUT
      14:02:00,002 ERROR [org.jboss.as.ejb3.timerservice.mk2.task.TimerTask] (pool-4-thread-2) Error during retyring timeout for timer: [id=a27e348a-2d0d-4e63-b415-351349678057 timedObjectId=EMailPoller auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.mk2.TimerServiceImpl@274cbf3f initialExpiration=Mon Oct 31 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Mon Oct 31 14:02:15 CET 2011 timerState=RETRY_TIMEOUT: java.lang.IllegalStateException: Component is stopped
       at org.jboss.as.ee.component.BasicComponent.waitForComponentStart(BasicComponent.java:98) [jboss-as-ee-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:77) [jboss-as-ee-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:127) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.SingletonTimedObjectInvokerImpl.callTimeout(SingletonTimedObjectInvokerImpl.java:46) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.mk2.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:73) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at org.jboss.as.ejb3.timerservice.mk2.task.TimerTask.run(TimerTask.java:119) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_26]
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_26]
       at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_26]
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
       at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
       at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
      
      

       

       

      I think its simliar to @Schedule timer service in jboss-as-web-7.0.1 not working and the according issue https://issues.jboss.org/browse/AS7-1679  but when i compare the fixed date of the issue (30/Aug/11) and my current JBoss version JBoss AS 7.1.0.Alpha2-SNAPSHOT "Ahoy!" from last week nightly built, i assume the problem is still alive.

       

       

      To remove the exceptions i have to clear the timer data in JBOSS_HOME/standaline/data/timer-service-data/

      Anyone an idea?