2017-10-19 20 views
0

Je suis en train de refactoriser une classe responsable de l'exécution des travaux planifiés. Donc, je viens de supprimer une méthode et maintenant l'artefact .ear n'est pas déployé.MSC000001: Impossible de démarrer le service du type. Schedule

classe d'origine:

@Stateless(name = "jobScheduleService") 
public class JobScheduleService { 

    @Inject 
    private FormService formService;; 

    @EJB 
    private EliminationService eliminationService; 

    @Schedules({ 
      @Schedule(hour = "23", minute = "50") 
    }) 
    public void remind() throws MessagingException { 
     formService.sendDeadlineReminder(); 
    } 

    @Schedules({ 
      @Schedule(hour = "2", minute = "00") 
    }) 
    public void eliminatesOutOfDate() { 
     this.eliminationService.eliminatesOutOfDate(); 
    } 
} 

classe avec eliminatesOutOfDate() méthode retirée:

@Stateless(name = "jobScheduleService") 
public class JobScheduleService { 

    @Inject 
    private FormService formService; 

    @Schedules({ 
      @Schedule(hour = "23", minute = "50") 
    }) 
    public void remind() throws MessagingException { 
     formService.sendDeadlineReminder(); 
    } 
} 

Le stacktrace:

15:29:27,480 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.subunit."test-ear-1.11.0-DEV.ear"."test-ejb-1.0-SNAPSHOT.jar".component.jobScheduleService.ejb3.timerService: org.jboss.msc.service.StartException in service jboss.deployment.subunit."test-ear-1.11.0-DEV.ear"."test-ejb-1.0-SNAPSHOT.jar".component.jobScheduleService.ejb3.timerService: Failed to start service 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_151] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151] 
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151] 
Caused by: java.lang.NullPointerException 
    at org.jboss.as.ejb3.timerservice.TimerServiceImpl.doesTimeoutMethodMatch(TimerServiceImpl.java:928) 
    at org.jboss.as.ejb3.timerservice.TimerServiceImpl.restoreTimers(TimerServiceImpl.java:679) 
    at org.jboss.as.ejb3.timerservice.TimerServiceImpl.start(TimerServiceImpl.java:189) 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1] 
    ... 3 more 

et

15:29:29,136 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 38) JBAS014612: Falha na operação ("deploy") - endereço ({"deployment" => "test-ear-1.11.0-DEV.ear"}) - falha na descrição: {"JBAS014671: Falha de serviços" => {"jboss.deployment.subunit.\"test-ear-1.11.0-DEV.ear\".\"test-ejb-1.0-SNAPSHOT.jar\".component.jobScheduleService.ejb3.timerService" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"test-ear-1.11.0-DEV.ear\".\"test-ejb-1.0-SNAPSHOT.jar\".component.jobScheduleService.ejb3.timerService: Failed to start service 
    Caused by: java.lang.NullPointerException"}} 
15:29:29,136 ERROR [org.jboss.as.server] (management-handler-thread - 38) JBAS015870: O procedimento da implantação "test-ear-1.11.0-DEV.ear" foi revertido com falha de mensagem 
{"JBAS014671: Falha de serviços" => {"jboss.deployment.subunit.\"test-ear-1.11.0-DEV.ear\".\"test-ejb-1.0-SNAPSHOT.jar\".component.jobScheduleService.ejb3.timerService" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"test-ear-1.11.0-DEV.ear\".\"test-ejb-1.0-SNAPSHOT.jar\".component.jobScheduleService.ejb3.timerService: Failed to start service 
    Caused by: java.lang.NullPointerException"}} 

Je ne comprends pas pourquoi l'exception se produit.

Répondre