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

    Timer Service not started for singleton deployments (4.0.5.G

    lkowalczyk

      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?

        • 1. Re: Timer Service not started for singleton deployments (4.0
          mhaduk

          Hi,

          I have the same issue with JBOSS 4.2.2GA. Were you able to solve this problem? Would be graterull for help.

          Regards,
          Daniel

          • 2. Re: Timer Service not started for singleton deployments (4.0
            oscarghe

            Hi,
            I've had the same problem, but deploying two EJB3 SLSB into a .sar containing an MBean (a custom service).
            Into the .sar archive, along with the code of the service MBean, I have an .ejb3 archive containing the two SLSB; one of this SLSB has a dependency on the MBean (with @Depends annotation).
            When I deploy the .sar copying it under deploy/ directory on a running instance of JBoss, the deploy has success; the problem arises when I restart the instance with the .sar always on the deploy/ directory. The exception is thrown for each one of the SLSB.

            My configuration is:
            JBoss 4.0.5.GA (with EJB3 patches)
            JDK 1.5.0_12

            Any help is very appreciated. Thanks!

            Oscar