9 Replies Latest reply on Dec 10, 2007 12:11 PM by Sabeur Khachlouf

    Exception on Timer-Execution under Weblogic

    Andreas Schienagel Newbie

      I am evaluating the compatibility of jBPM to work in other application server environments. Actual i am on testing in weblogic (8.0, 9.0, 9.2).

      It works in all versions perfectly, except the timer functionality.

      In 8.0 no TimedObject.class exists, so it has to be done i an other way )-:
      In 9.0 and 9.2 The timers are created in db, but at the execution date (duedate) an exception is thrown:

      ####<29.06.2007 9.59 Uhr CEST> <Error> <EJB> <winpc70> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1183103982265> <BEA-011088> <The following error occurred while invoking the ejbTimeout(javax.ejb.Timer) method of EJB 'TimerServiceBean(Application: ISOWorkflow, EJBComponent: jbpm-enterprise.jar)'.
      javax.ejb.EJBException: EJB Exception: : org.jbpm.JbpmException: couldn't execute timer
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:105)
       at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:298)
       at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
       at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
       at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
      Caused by: javax.ejb.EJBException: EJB Exception: : org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@dd5a9d
       at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
       at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:61)
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
       at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:298)
       at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
       at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
       at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
      Caused by: org.jbpm.graph.def.DelegationException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:376)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
       at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$fa7aa0e4.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:270)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
       at org.jbpm.graph.def.Node.leave(Node.java:381)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
       at org.jbpm.graph.node.State$$EnhancerByCGLIB$$e0d3d84e.leave(<generated>)
       at org.jbpm.graph.exe.Token.signal(Token.java:194)
       at org.jbpm.graph.exe.Token.signal(Token.java:157)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
       at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$44509b08.signal(<generated>)
       at org.jbpm.job.Timer.execute(Timer.java:93)
       at org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand.execute(ExecuteTimerCommand.java:23)
       at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
       ... 7 more
      Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
       at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:153)
       at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByName(EjbSchedulerService.java:49)
       at org.jbpm.scheduler.def.CancelTimerAction.execute(CancelTimerAction.java:46)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
       ... 28 more
      Caused by: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
       at weblogic.ejb.container.timer.TimerImpl.cancel(TimerImpl.java:618)
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean.cancelTimersByName(TimerServiceBean.java:53)
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:138)
       ... 31 more
      ; nested exception is: org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@dd5a9d
       at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:657)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
       at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:76)
       at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
       ... 5 more
      ; nested exception is: org.jbpm.JbpmException: couldn't execute timer
       at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:643)
       at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
       at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:570)
       at weblogic.ejb.container.internal.TimerDrivenLocalObject.postInvoke(TimerDrivenLocalObject.java:76)
       at weblogic.ejb.container.timer.TimerImpl.timerExpired(TimerImpl.java:395)
       at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:265)
       at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
       at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
      >


      I use the cvs version (3.2.1) of the jbpm-engine.

      Anyone an idea about this issue??

        • 1. Re: Exception on Timer-Execution under Weblogic
          Ivan Sevastyanov Newbie

          Do you try to cancel timer in you delegation action class?

          Can you post you proc-definition.xml and source code of action class?

          • 2. Re: Exception on Timer-Execution under Weblogic
            Andreas Schienagel Newbie

            No ActionDelegation. Just plain JPDL:

            <state name="State1: Wait 1 minute">
             <timer name='waitstate' duedate='1 minute' transition='to_task1' />
             <transition name="to_task1" to="Task1: WaitState is over"></transition>
             </state>

            (Working under JBoss)

            I did a little mor research. The timer becomes executed. The problem appears at the cancelling of the timer:
            13:35:13,406 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG TimerServiceBean : ejb timer [
            EJB Timer] id: 2 pk: 1 info: org.jbpm.scheduler.ejbtimer.TimerInfo@41fef timer: 1183116913406.195(0) state: 2 ejb: TimerServiceBea
            n(Application: ISOWorkflow, EJBComponent: jbpm-enterprise.jar) Thread: Thread[[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.ker
            nel.Default (self-tuning)',5,Pooled Threads] fires
            13:35:22,078 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG TimerServiceBean : looking up
            local command service
            Context initial = new InitialContext();
            Context environment = (Context) initial.lookup('java:comp/env');
            LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) environment.lookup('ejb/LocalCommandServiceBean');
            LocalCommandService localCommandService = localCommandServiceHome.create();
            Serializable info = ejbTimer.getInfo();
            TimerInfo timerInfo = (TimerInfo) info;
            TimerID: 19
            Timer timer = (Timer) localCommandService.execute(new ExecuteTimerCommand(timerInfo.getTimerId()));
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG CommandServiceBean : getting j
            bpm configuration resource from the environment properties
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG CommandServiceBean : couldn't
            find configuration property JbpmCfgResource through JNDI
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG CommandServiceBean : getting d
            efault jbpm configuration resource (jbpm.cfg.xml)
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG CommandServiceBean : handing o
            ver the command execution to the command service
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG JbpmContextInfo : creating jbp
            m context with service factories '[tx, message, scheduler, logging, persistence, authentication]'
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG JbpmContext : creating org.jbp
            m.JbpmContext@11b138a
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG CommandServiceBean : executing
             org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@9ff7c0
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG DbPersistenceServiceFactory :
            creating persistence service
            13:35:22,093 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG DbPersistenceService : using c
            urrent hibernate session SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] dele
            tions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
            13:35:22,140 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG ExecuteTimerCommand : executin
            g timer 19
            13:35:22,156 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG GraphElement : event 'before-s
            ignal' on 'State(State1: Wait 1 minute)' for 'Token(/)'
            13:35:22,156 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG GraphElement : event 'node-lea
            ve' on 'State(State1: Wait 1 minute)' for 'Token(/)'
            13:35:22,156 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG GraphElement : executing actio
            n 'CancelTimerAction(1249338)'
            13:35:22,156 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG Token : token[181] is locked b
            y token[181]
            13:35:22,171 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG EjbSchedulerService : deleting
             timers by name waitstate
            13:35:22,171 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG JobSession : deleting timer ti
            mer(waitstate,13:15:06,000) by name waitstate
            13:35:22,171 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG TimerServiceBean : cancelling
            timers with name waitstate from the ejb timer service
            13:35:22,171 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG Token : token[181] is unlocked
             by token[181]
            13:35:22,187 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR GraphElement : action threw ex
            ception: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from
            within ejbTimeout
            javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expir
            ation timers cannot be cancelled from within ejbTimeout
            java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
             at weblogic.ejb.container.timer.TimerImpl.cancel(TimerImpl.java:618)
             at org.jbpm.scheduler.ejbtimer.TimerServiceBean.cancelTimersByName(TimerServiceBean.java:53)
             at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:63)
            




            • 3. Re: Exception on Timer-Execution under Weblogic
              Ronald van Kuijk Master

              weblogic8 does not officially support the ejb3 spec (afaik) so that might be the reaseon if you use the enterprise version.

              Look at WLS 10 that one is compliant

              • 4. Re: Exception on Timer-Execution under Weblogic
                Andreas Schienagel Newbie

                You are right with weblogic 8, hence i am using Weblogic 9/9.2 which supports at least ejb2.1 and the EJB Timers.

                Is the TimerService in jbpm based on EJB3.0? I thought it's 2.1.

                Since the Timer functionality of JBPM is based on the J2EE Specs for EJB Timers there shouldn't be a problem to use it in compliant environments.
                If I check the logs, the timer is created and it's executed at the right time, but the cancelling does not work.
                Even the Node.leave event is fired:

                GraphElement : event 'node-leave' on 'State(State1: Wait 1 minute)' for 'Token(/)'


                Maybe it has something to do with:
                Token : token[181] is locked by token[181]
                ...
                Token : token[181] is unlocked by token[181]

                Seems a little bit strange for me?!?

                • 5. Re: Exception on Timer-Execution under Weblogic
                  Edward Staub Expert

                   

                  "kukeltje" wrote:
                  weblogic8 does not officially support the ejb3 spec (afaik) so that might be the reaseon if you use the enterprise version.

                  Look at WLS 10 that one is compliant


                  Ronald,

                  I'm confused... is the JBPM enterprise support dependent on ejb3?
                  That's surprising, especially since I thought it had to be J2SE 1.4 compatible.

                  Thanks,
                  -Ed Staub

                  • 6. Re: Exception on Timer-Execution under Weblogic
                    Ronald van Kuijk Master

                    no.. my bad... I mixed things up. ejb 2.1 is enough

                    • 7. Re: Exception on Timer-Execution under Weblogic
                      Andreas Schienagel Newbie

                      I tried something else:

                      I Created a task with timer-repeat:

                      <timer name="testTimer" duedate="30 seconds" repeat="10 seconds">
                       <action name="act" class="de.isogmbh.isoworkflow.action.MessageActionHandler"/>
                       </timer>


                      And the repetition including the timer execution is working fine...As long as the taskinstance is not ended. It seems, that the timer is canceled, but it's not deleted from db.
                      When I delete the entry in JBPM_JOB table manually, I can proceed with the execution.

                      Exception after trying to end the taskinstance:
                      Cjavax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: org.jbpm.JbpmException: couldn't execute de.isogmbh.isoworkflow.c
                      ore.commands.CloseTaskInstanceCommand@1422b45
                      org.jbpm.JbpmException: couldn't execute de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand@1422b45
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
                      at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:61)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.execute(JBPMManagerBean.java:238)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.closeTaskInstance(JBPMManagerBean.java:60)
                      at de.isogmbh.isoworkflow.core.JBPMManager_der1zk_EOImpl.closeTaskInstance(JBPMManager_der1zk_EOImpl.java:83)
                      at de.isogmbh.isoworkflow.web.MyTasks_CloseTaskServlet.doGet(MyTasks_CloseTaskServlet.java:77)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                      Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This
                      Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:153)
                      at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByProcessInstance(EjbSchedulerService.java:55)
                      at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$38ec7dc8.end(<generated>)
                      at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
                      at org.jbpm.graph.exe.Token.end(Token.java:303)
                      at org.jbpm.graph.exe.Token.end(Token.java:253)
                      at org.jbpm.graph.node.EndState.execute(EndState.java:59)
                      at org.jbpm.graph.def.Node.enter(Node.java:318)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$f6ee189.enter(<generated>)
                      at org.jbpm.graph.def.Transition.take(Transition.java:151)
                      at org.jbpm.graph.def.Node.leave(Node.java:393)
                      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$49b4d7d3.leave(<generated>)
                      at org.jbpm.graph.exe.Token.signal(Token.java:194)
                      at org.jbpm.graph.exe.Token.signal(Token.java:139)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$bbfd881d.signal(<generated>)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:476)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:390)
                      at de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand.execute(CloseTaskInstanceCommand.java:28)
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
                      ... 19 more
                      Caused by: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.timer.TimerImpl.checkAllowedInvoke(TimerImpl.java:758)
                      at weblogic.ejb.container.timer.TimerImpl.getInfo(TimerImpl.java:684)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean.deleteTimersForProcessInstance(TimerServiceBean.java:70)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:138)
                      ... 59 more
                      javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: org.jbpm.JbpmException: couldn't execute de.isogmbh.isoworkflow.c
                      ore.commands.CloseTaskInstanceCommand@1422b45
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
                      at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:76)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.execute(JBPMManagerBean.java:238)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.closeTaskInstance(JBPMManagerBean.java:60)
                      at de.isogmbh.isoworkflow.core.JBPMManager_der1zk_EOImpl.closeTaskInstance(JBPMManager_der1zk_EOImpl.java:83)
                      at de.isogmbh.isoworkflow.web.MyTasks_CloseTaskServlet.doGet(MyTasks_CloseTaskServlet.java:77)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                      Caused by: org.jbpm.JbpmException: couldn't execute de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand@1422b45
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
                      at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:61)
                      ... 18 more
                      Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This
                      Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:153)
                      at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByProcessInstance(EjbSchedulerService.java:55)
                      at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$38ec7dc8.end(<generated>)
                      at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
                      at org.jbpm.graph.exe.Token.end(Token.java:303)
                      at org.jbpm.graph.exe.Token.end(Token.java:253)
                      at org.jbpm.graph.node.EndState.execute(EndState.java:59)
                      at org.jbpm.graph.def.Node.enter(Node.java:318)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$f6ee189.enter(<generated>)
                      at org.jbpm.graph.def.Transition.take(Transition.java:151)
                      at org.jbpm.graph.def.Node.leave(Node.java:393)
                      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$49b4d7d3.leave(<generated>)
                      at org.jbpm.graph.exe.Token.signal(Token.java:194)
                      at org.jbpm.graph.exe.Token.signal(Token.java:139)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$bbfd881d.signal(<generated>)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:476)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:390)
                      at de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand.execute(CloseTaskInstanceCommand.java:28)
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
                      ... 19 more
                      Caused by: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.timer.TimerImpl.checkAllowedInvoke(TimerImpl.java:758)
                      at weblogic.ejb.container.timer.TimerImpl.getInfo(TimerImpl.java:684)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean.deleteTimersForProcessInstance(TimerServiceBean.java:70)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:138)
                      ... 59 more
                      java.rmi.RemoteException: EJB Exception: ; nested exception is:
                      java.lang.RuntimeException: couldn't execute command
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:95)
                      at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:724)
                      at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:681)
                      at weblogic.ejb.container.internal.BaseEJBObject.postInvoke1(BaseEJBObject.java:447)
                      at weblogic.ejb.container.internal.StatelessEJBObject.postInvoke1(StatelessEJBObject.java:72)
                      at weblogic.ejb.container.internal.BaseEJBObject.postInvokeTxRetry(BaseEJBObject.java:374)
                      at de.isogmbh.isoworkflow.core.JBPMManager_der1zk_EOImpl.closeTaskInstance(JBPMManager_der1zk_EOImpl.java:97)
                      at de.isogmbh.isoworkflow.web.MyTasks_CloseTaskServlet.doGet(MyTasks_CloseTaskServlet.java:77)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
                      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
                      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
                      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
                      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
                      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
                      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                      at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                      Caused by: java.lang.RuntimeException: couldn't execute command
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.execute(JBPMManagerBean.java:242)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.closeTaskInstance(JBPMManagerBean.java:60)
                      at de.isogmbh.isoworkflow.core.JBPMManager_der1zk_EOImpl.closeTaskInstance(JBPMManager_der1zk_EOImpl.java:83)
                      ... 15 more
                      Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: org.jbpm.JbpmException: couldn't execute de.isogmbh.is
                      oworkflow.core.commands.CloseTaskInstanceCommand@1422b45
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
                      at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:76)
                      at de.isogmbh.isoworkflow.core.JBPMManagerBean.execute(JBPMManagerBean.java:238)
                      ... 17 more
                      Caused by: org.jbpm.JbpmException: couldn't execute de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand@1422b45
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
                      at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:61)
                      ... 18 more
                      Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This
                      Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:226)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:671)
                      at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
                      at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:153)
                      at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByProcessInstance(EjbSchedulerService.java:55)
                      at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$38ec7dc8.end(<generated>)
                      at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
                      at org.jbpm.graph.exe.Token.end(Token.java:303)
                      at org.jbpm.graph.exe.Token.end(Token.java:253)
                      at org.jbpm.graph.node.EndState.execute(EndState.java:59)
                      at org.jbpm.graph.def.Node.enter(Node.java:318)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$f6ee189.enter(<generated>)
                      at org.jbpm.graph.def.Transition.take(Transition.java:151)
                      at org.jbpm.graph.def.Node.leave(Node.java:393)
                      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$49b4d7d3.leave(<generated>)
                      at org.jbpm.graph.exe.Token.signal(Token.java:194)
                      at org.jbpm.graph.exe.Token.signal(Token.java:139)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:585)
                      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
                      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$bbfd881d.signal(<generated>)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:476)
                      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:390)
                      at de.isogmbh.isoworkflow.core.commands.CloseTaskInstanceCommand.execute(CloseTaskInstanceCommand.java:28)
                      at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
                      ... 19 more
                      Caused by: javax.ejb.NoSuchObjectLocalException: [EJB:011085]This Timer has either expired or been cancelled and therefore cannot be invoked.
                      at weblogic.ejb.container.timer.TimerImpl.checkAllowedInvoke(TimerImpl.java:758)
                      at weblogic.ejb.container.timer.TimerImpl.getInfo(TimerImpl.java:684)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean.deleteTimersForProcessInstance(TimerServiceBean.java:70)
                      at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.deleteTimersForProcessInstance(TimerServiceBean_p7ac74_ELOImpl.java:138)
                      ... 59 more


                      • 8. Re: Exception on Timer-Execution under Weblogic
                        Andreas Schienagel Newbie

                        After all...I found a possibillity to solve this problem...Here comes a question for the developers:

                        The error is thrown in Timerservicebean. First, the EJB Timer becomes cancled in 'cancelTimersByName'. Afterwards method 'deleteTimersForProcessInstance' is called and while executing

                        TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
                        an error is thrown (in weblogic not in jboss), because there is no timer object for operation left.

                        I don't understand this behaviour...so I insert a try...catch block in the second method and all works fine.

                        Can somebody explain it to me?

                        Here are the methods (with my 'correction')
                        public void cancelTimersByName(String timerName, Token token) {
                         // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
                         // of course, the corresponding ejb timer notifications have to be ignored.
                        
                        log.debug("cancelling timers with name "+timerName+" from the ejb timer service");
                        
                         TimerService timerService = sessionContext.getTimerService();
                        
                         Iterator iter = timerService.getTimers().iterator();
                        
                         while (iter.hasNext()) {
                         javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
                         if (ejbTimer.getInfo() instanceof TimerInfo) {
                         TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
                         if (timerInfo.matchesName(timerName, token)) {
                         ejbTimer.cancel();
                         }
                         }
                         }
                        }
                        



                        public void deleteTimersForProcessInstance(ProcessInstance processInstance) {
                        
                        // TODO make the scanning of timers for cancellation optional by only deleting the timerjobs in the db.
                        // of course, the corresponding ejb timer notifications have to be ignored.
                        
                         log.debug("deleting timers for process instance "+processInstance+" from the ejb timer service");
                         TimerService timerService = sessionContext.getTimerService();
                         Iterator iter = timerService.getTimers().iterator();
                        
                         while (iter.hasNext()) {
                         javax.ejb.Timer ejbTimer = (javax.ejb.Timer) iter.next();
                         try {
                         if (ejbTimer.getInfo() instanceof TimerInfo) {
                         TimerInfo timerInfo = (TimerInfo) ejbTimer.getInfo();
                         if (timerInfo.matchesProcessInstance(processInstance)) {
                         ejbTimer.cancel();
                         }
                         }
                         } catch (Exception e) {
                         System.out.println("CATCH!");
                         }
                        }
                        





                        • 9. Re: Exception on Timer-Execution under Weblogic
                          Sabeur Khachlouf Newbie

                          Hi guys,
                          I'm working with Weblogic 10.0 and jbpm-jpdl-3.2.2. I have the same problem. Do you have an idea on how I can fix it?
                          Thanks a lot in advance.

                          Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
                           at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:232)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:861)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:788)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:421)
                           at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:228)
                           at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.deleteTimersByName(EjbSchedulerService.java:49)
                           at org.jbpm.scheduler.def.CancelTimerAction.execute(CancelTimerAction.java:46)
                           at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
                           ... 37 more
                          Caused by: java.lang.IllegalStateException: Single expiration timers cannot be cancelled from within ejbTimeout
                           at weblogic.ejb.container.timer.TimerImpl.cancel(TimerImpl.java:626)
                           at org.jbpm.scheduler.ejbtimer.TimerServiceBean.cancelTimersByName(TimerServiceBean.java:53)
                           at org.jbpm.scheduler.ejbtimer.TimerServiceBean_p7ac74_ELOImpl.cancelTimersByName(TimerServiceBean_p7ac74_ELOImpl.java:213)
                           ... 40 more
                          ; nested exception is: org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand@96ba55a
                           at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:147)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:847)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:788)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:421)
                           at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_ELOImpl.execute(CommandServiceBean_jdfmx8_ELOImpl.java:76)
                           at org.jbpm.scheduler.ejbtimer.TimerServiceBean.ejbTimeout(TimerServiceBean.java:95)
                           ... 5 more
                          ; nested exception is: org.jbpm.JbpmException: couldn't execute timer
                           at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:147)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:833)
                           at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:788)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:483)
                           at weblogic.ejb.container.internal.BaseLocalObject.postInvoke(BaseLocalObject.java:736)
                           Truncated. see log file for complete stacktrace