Implantando o Java @Schedule com o Wildfly 8.1.0 Final
Estou tentando testar a anotação @Schedule com o seguinte código:
import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
@Singleton
@Startup
public class TimerTest {
public TimerTest() {
}
@Schedule(second = "*", minute = "*", hour = "*")
public void sayHello() {
System.out.println("Hello");
}
}
No entanto, quando eu o implanto na instância autônoma do wildfly 8.1.0 (final), estou recebendo as seguintes mensagens de erro nos logs:
2014-09-23 08:38:03,076 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."test-server.war".component.TimerTest.ejb3.timerService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test-server.war".component.TimerTest.ejb3.timerService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
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]
Caused by: java.lang.NullPointerException
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.doesTimeoutMethodMatch(TimerServiceImpl.java:959)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.restoreTimers(TimerServiceImpl.java:710)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.start(TimerServiceImpl.java:202)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
2014-09-23 08:38:07,098 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test-server.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test-server.war\".component.TimerTest.ejb3.timerService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test-server.war\".component.TimerTest.ejb3.timerService: Failed to start service
Caused by: java.lang.NullPointerException"}}
2014-09-23 08:38:07,145 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."test-server.war".component.TimerTest.ejb3.timerService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test-server.war".component.TimerTest.ejb3.timerService: Failed to start service
JBAS014777: Services which failed to start: service jboss.deployment.unit."test-server.war".component.TimerTest.ejb3.timerService
Alguma idéia do que poderia estar causando isso?