title: EJB3 schedule not working correctly
body: <p>I've been following the <a href="http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_16" rel="nofollow noreferrer">example of Adam Bean</a> to do a timer, but it doesn't work properly. I created an <code>@Singleton</code> EJB with a method which is annoted with <code>@Schedule</code>. The application is deployed to a wildfly 11. I have two problems here. The first is, that my timer logs every second, instead of every minute. The second problem is, that every time the time is triggered, I get an error message.</p>
  
  <p>Could someone give me a hint, what do I do wrong? Maybe I'm just blind and cant see it.</p>
  
  <p>My class:</p>
  
  <pre><code>import javax.ejb.Schedule;
  import javax.ejb.Singleton;
  import java.util.logging.Logger;
  
  @Singleton
  public class DeviceTrackerCronJob {
  
      private static final Logger LOG = Logger.getLogger(DeviceTrackerCronJob.class.getName());
  
      private long counter;
  
  @Schedule(second = "*", minute = "*/1", hour = "*", info = "Every Minute!")
  public void execute() {
      LOG.info("### --- FAKING SOME CONTENT " + counter++);
      }
  }
  </code></pre>
  
  <p>The message I get is:</p>
  
  <blockquote>
    <p>12:42:03,025 INFO  [de.klemensmorbe.tracking.DeviceTrackerCronJob] (EJB default - 1) ### --- FAKING SOME CONTENT 575
    12:42:04,040 ERROR [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0020: Error invoking timeout for timer: [id=a797d1ca-e550-41e4-bfe7-46066f7b24b3 timedObjectId=web.web.DeviceTrackerCronJob auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@c39b6bb initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Wed Jan 03 12:42:05 UTC 2018 timerState=IN_TIMEOUT info=null]: java.lang.RuntimeException: WFLYEJB0343: Cannot invoke timeout method because method null is not a timeout method
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:83)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:109)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.CalendarTimerTask.invokeBeanMethod(CalendarTimerTask.java:66)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.CalendarTimerTask.callTimeout(CalendarTimerTask.java:53)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimerTask.run(TimerTask.java:160)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimerServiceImpl$Task$1.run(TimerServiceImpl.java:1220)
            at org.wildfly.extension.request-controller//org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:497)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
            at java.base/java.lang.Thread.run(Thread.java:844)
            at org.jboss.threads//org.jboss.threads.JBossThread.run(JBossThread.java:320)</p>
    
    <p>12:42:04,041 INFO  [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0021: Timer: [id=a797d1ca-e550-41e4-bfe7-46066f7b24b3 timedObjectId=web.web.DeviceTrackerCronJob auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@c39b6bb initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Wed Jan 03 12:42:05 UTC 2018 timerState=IN_TIMEOUT info=null] will be retried
    12:42:04,041 INFO  [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0023: Retrying timeout for timer: [id=a797d1ca-e550-41e4-bfe7-46066f7b24b3 timedObjectId=web.web.DeviceTrackerCronJob auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@c39b6bb initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Wed Jan 03 12:42:05 UTC 2018 timerState=IN_TIMEOUT info=null]
    12:42:04,042 ERROR [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0022: Error during retrying timeout for timer: [id=a797d1ca-e550-41e4-bfe7-46066f7b24b3 timedObjectId=web.web.DeviceTrackerCronJob auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@c39b6bb initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Wed Jan 03 12:42:05 UTC 2018 timerState=RETRY_TIMEOUT info=null]: java.lang.RuntimeException: WFLYEJB0343: Cannot invoke timeout method because method null is not a timeout method
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:83)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:109)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.CalendarTimerTask.invokeBeanMethod(CalendarTimerTask.java:66)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.CalendarTimerTask.callTimeout(CalendarTimerTask.java:53)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimerTask.retryTimeout(TimerTask.java:234)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimerTask.run(TimerTask.java:168)
            at org.jboss.as.ejb3//org.jboss.as.ejb3.timerservice.TimerServiceImpl$Task$1.run(TimerServiceImpl.java:1220)
            at org.wildfly.extension.request-controller//org.wildfly.extension.requestcontroller.RequestController$QueuedTask$1.run(RequestController.java:497)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
            at java.base/java.lang.Thread.run(Thread.java:844)
            at org.jboss.threads//org.jboss.threads.JBossThread.run(JBossThread.java:320)</p>
  </blockquote>