2 Replies Latest reply on Jun 13, 2008 6:08 AM by oscar ghersi

    Timer Service not started for singleton deployments (4.0.5.G

    Lukasz Kowalczyk Newbie

      I installed an ejb3-clustered configuration of JBoss 4.0.5 and deployed an application in all/deploy-hasingleton. Upon deployment of a single session bean contained in the application I get an exception (snippet of server.log below):

      2007-08-28 12:24:08,640 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB: pl.zprsa.haos.admin.customs.EditCustomsAction ejbName: EditCustomsAction
      2007-08-28 12:24:08,656 DEBUG [org.jboss.ejb.txtimer.EJBTimerServiceImpl] createTimerService: org.jboss.ejb.txtimer.TimerServiceImpl@142f703
      2007-08-28 12:24:08,671 DEBUG [org.jboss.ejb.txtimer.EJBTimerServiceImpl] removeTimerService: org.jboss.ejb.txtimer.TimerServiceImpl@142f703
      2007-08-28 12:24:08,671 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed jboss.j2ee:ear=Haos.ear,jar=Admin-ejb.jar,name=EditCustomsAction,service=EJB3
      java.lang.NullPointerException
      at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolicy.java:164)


      This exception is repeated for every other session bean.

      Line 164 of DatabasePersistencePolicy is

      list.addAll(dbpPlugin.selectTimers(containerId));


      Obviously, dbpPlugin is null (list is instantiated beforehand in the same method). I debugged the problem and made sure that DatabasePersistencePolicy.startService() is never called before the call to listTimerHandles().

      How do I get around this problem for singleton deployments?