Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-5238

[GSS](6.4.z) "java.lang.RuntimeException: No runtime engine found, could not be initialized yet" with Singleton and EJBTimerScheduler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.4.11.GA
    • jBPM Core
      • Singleton runtime manager
      • EJBTimerScheduler (kie-server default)
    • Hide

      Test with BPMS 6.4.11

      • Set "org.jbpm.overdue.timer.wait" to large enough (to avoid other errors)
        <property name="org.jbpm.overdue.timer.wait" value="600000"/>
        
      • Unzip the attached RHBPMS-5238-helloTimer-repo.zip
      • Clone the repo via business-central
      • Build&Deploy
      • Undeploy from "Deploy"->"Process Deployments" just in case (we want to test kie-server)
      • Create container and start in "Execution Servers"
      • Start a process. e.g.
        curl -X POST -u kieserver:kieserver1! -H "Content-Type: application/json" -d '{}' http://localhost:8080/kie-server/services/rest/server/containers/org.kie.example:project4:1.0.0-SNAPSHOT/processes/project1.helloTimer/instances
        
      • Shutdown BPMS right after "Process Started" is logged. (Timer is 15sec)
      • Wait for 15 sec
      • Start BPMS
      • Apply the attached slowDB.rule
      • You will hit the error. (It doesn't reproduce with PerProcessInstance)
      Show
      Test with BPMS 6.4.11 Set "org.jbpm.overdue.timer.wait" to large enough (to avoid other errors) <property name="org.jbpm.overdue.timer.wait" value="600000"/> Unzip the attached RHBPMS-5238 -helloTimer-repo.zip Clone the repo via business-central Build&Deploy Undeploy from "Deploy"->"Process Deployments" just in case (we want to test kie-server) Create container and start in "Execution Servers" Start a process. e.g. curl -X POST -u kieserver:kieserver1! -H "Content-Type: application/json" -d '{}' http://localhost:8080/kie-server/services/rest/server/containers/org.kie.example:project4:1.0.0-SNAPSHOT/processes/project1.helloTimer/instances Shutdown BPMS right after "Process Started" is logged. (Timer is 15sec) Wait for 15 sec Start BPMS Apply the attached slowDB.rule You will hit the error. (It doesn't reproduce with PerProcessInstance)

      Under the conditions:

      • Singleton runtime manager
      • EJBTimerScheduler

      On BPM Suite server reboot, if there is an overdue timer, it will wait until TimerServiceRegistry is ready.

      https://github.com/kiegroup/jbpm/blob/6.5.x/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EJBTimerScheduler.java#L75-L88

      However, it only checks TimerServiceRegistry.getInstance().get(timerServiceId). Even if it is not null, SingletonRuntimeManager.getRuntimeEngine() may return null because there is a time gap until SingletonRuntimeManager.singleton is populated.

      https://github.com/kiegroup/jbpm/blob/6.5.x/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/RuntimeManagerFactoryImpl.java#L63-L64
      https://github.com/kiegroup/jbpm/blob/6.5.x/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/SingletonRuntimeManager.java#L89

      So it will result in "RuntimeException: No runtime engine found, could not be initialized yet"

      12:51:15,795 ERROR [org.jboss.as.ejb3] (EJB default - 1) JBAS014122: Error during retrying timeout for timer: [id=a9bf4cc2-dc7c-403c-9f1e-222005b78076 timedObjectId=kie-server.kie-server.EJBTimerScheduler auto-timer?:false persistent?:true timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@8669964 initialExpiration=Mon Apr 15 12:50:09 JST 2019 intervalDuration(in milli sec)=0 nextExpiration=null timerState=RETRY_TIMEOUT info=EjbTimerJob [timerJobInstance=GlobalJpaTimerJobInstance [timerServiceId=org.kie.example:project4:1.0.0-SNAPSHOT-timerServiceId, getJobHandle()=EjbGlobalJobHandle [uuid=11-16-1]]]]: javax.ejb.EJBException: java.lang.RuntimeException: java.lang.RuntimeException: No runtime engine found, could not be initialized yet
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.tx.TimerCMTTxInterceptor.handleExceptionInOurTx(TimerCMTTxInterceptor.java:53) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:280) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:330) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:242) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:101) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:111) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.timerservice.task.TimerTask.callTimeout(TimerTask.java:187) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.timerservice.task.TimerTask.retryTimeout(TimerTask.java:210) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ejb3.timerservice.task.TimerTask.run(TimerTask.java:167) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_66]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_66]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
      	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: No runtime engine found, could not be initialized yet
      	at org.jbpm.services.ejb.timer.EJBTimerScheduler.executeTimerJob(EJBTimerScheduler.java:93)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_66]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_66]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_66]
      	at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_66]
      	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:61) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:375) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86) [jboss-as-weld-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:99) [jboss-as-weld-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:61) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:61) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:375) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:104) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:93) [jboss-as-weld-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:52) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.3.Final-redhat-1.jar:1.1.3.Final-redhat-1]
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:278) [jboss-as-ejb3-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
      	... 25 more
      Caused by: java.lang.RuntimeException: No runtime engine found, could not be initialized yet
      	at org.jbpm.process.core.timer.impl.GlobalTimerService.getCommandService(GlobalTimerService.java:245)
      	at org.jbpm.process.core.timer.impl.GlobalTimerService.getCommandService(GlobalTimerService.java:223)
      	at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:75)
      	at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:47)
      	at org.jbpm.services.ejb.timer.EJBTimerScheduler.executeTimerJob(EJBTimerScheduler.java:90)
      	... 57 more
      

              elguardian@gmail.com Enrique González Martínez (Inactive)
              rhn-support-tkobayas Toshiya Kobayashi
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: