4 Replies Latest reply on Sep 22, 2010 11:34 AM by jaikiran pai

    JBoss AS 6 M4 failing to deploy EJB Timer upon redeploy

    Elias Ross Master

      My .ear fails to deploy upon server restart, since HornetMQ isn't ready when my EJBs deploy... This is bad.

       

      But also, if I force a restart, e.g. touch my deployment.ear, then I see this:

       

      16:31:50,978 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.autodesk.lbs.afx.subscriptionmanager.SubscriptionManagerStartup ejbName: SubscriptionManagerStartup
      16:31:50,978 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=SubscriptionManagerStartup,service=EJB3 state=Create: java.lang.IllegalStateException: Timer service with timedObjectId: jboss.j2ee:ear=geoserver.ear,jar=llejb-1.0.0.0-SNAPSHOT.jar,name=SubscriptionManagerStartup,service=EJB3 is already registered
              at org.jboss.ejb3.timerservice.mk2.TimerServiceRegistry.registerTimerService(TimerServiceRegistry.java:48) [:1.0.0-alpha-7]
              at org.jboss.ejb3.timerservice.mk2.TimerServiceFactoryImpl.createTimerService(TimerServiceFactoryImpl.java:81) [:1.0.0-alpha-7]
              at org.jboss.ejb3.TimerServiceContainer.createTimerService(TimerServiceContainer.java:249) [:1.5.0-alpha-4]
              at org.jboss.ejb3.TimerServiceContainer.lockedStart(TimerServiceContainer.java:109) [:1.5.0-alpha-4]
              at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:212) [:1.5.0-alpha-4]
              at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:581) [:1.5.0-alpha-4]
              at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.lockedStart(AOPBasedSingletonContainer.java:209) [:1.0.0-alpha-10]
              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:1011) [:1.5.0-alpha-4]
              at sun.reflect.GeneratedMethodAccessor333.invoke(Unknown Source) [:1.6.0_21]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.Alpha9]
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.Alpha9]

       

      I'm guessing the failed deployment the first time is causing a dangling timer as well. The EJB is marked as @Singleton @Startup, as well as has an EJB timer associated with it. Would this be worth filing as a JIRA issue or is this covered already?