1 2 Previous Next 19 Replies Latest reply on Jan 12, 2009 11:40 AM by kukeltje

    workaround for StackOverflow exception

    vanyatka

      Hi,

      Can anyone suggest if there is a workaround for StackOverflow exception that happens in case of long decision loops without persisting process state into DB?

      https://jira.jboss.org/jira/browse/JBSEAM-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

      Thanks,

        • 1. Re: workaround for StackOverflow exception
          kukeltje

          yes... wait for jBPM 4.0

          But how do you get to this issue... most of the time it is kind if improper use, or at least something that can be moddeled differently or at least implemented differently

          • 2. Re: workaround for StackOverflow exception
            vanyatka

            Thanks, Ronald

            I'm trying to implement an algorithm for building a chain of objects. I pick a position in the chain, select the most suitable object, insert that object and move on to next iteration. The whole process is a matter of several minutes, and I'm interested in its fastest completion. That's why I don't like the idea of syncing with the DB on each iteration, it is needless and slow in my scenario.

            Obviously I couldn't imagine to run against this sort of limitation while choosing jBPM for this.

            • 3. Re: workaround for StackOverflow exception
              vanyatka

              And one more thing.
              I've introduced a State node to the process so that business process is persisted. But how can I move past it, cause if I signal current node I get a fair error

              this token is locked by token


              Will it help if I try to save the process into DB manually from one of my Node's action handlers?

              • 4. Re: workaround for StackOverflow exception
                kukeltje

                No, do not do that. Wrong practise.

                With just this error (not a unittest and stacktrace) we are unable to help you. Can be caused by many different things

                • 5. Re: workaround for StackOverflow exception
                  vanyatka

                  Thanks for your advice, I won't :)

                  Let me not report any dumps so far, cause I don't quite get the picture of how to save the process state to DB with minimum time expense.

                  From what I can tell so far, I cannot use State node without some external signal that would wake it up.

                  Luckily I've come across this thread,
                  http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150584#4150584, which gave me the idea of considering using timers.

                  • 6. Re: workaround for StackOverflow exception
                    vanyatka

                    Here is what I've tried:

                    <state name="state2">
                     <timer duedate="1 seconds" transition="check more banners" >
                     <action class="com.agava.cbn.ods.action.SimpleStateHandler"></action>
                     </timer>
                    </state>


                    Not the best solution, but I thought I'd do the trick. Unfortunately there is another problem, now in Seam:

                    https://jira.jboss.org/jira/browse/JBSEAM-2575

                    • 7. Re: workaround for StackOverflow exception
                      kukeltje

                      You could try to use an in-memory configured version of HSQLDB. That does not realy persist to file, but it does doe db stuff.

                      Regarding the issue, it manifests itself in Seam, but is jBPM related and fixed in the upcomming 3.2.4 afaik.

                      • 8. Re: workaround for StackOverflow exception
                        kukeltje

                        btw, you could configure jBPM to *not* use transactions or use it's own transactions instead of using the seam provided one.

                        • 9. Re: workaround for StackOverflow exception
                          vanyatka

                           

                          You could try to use an in-memory configured version of HSQLDB. That does not realy persist to file, but it does doe db stuff.

                          Good idea. But I'm not there yet, I still cannot make it going without exception.

                          Regarding the issue, it manifests itself in Seam, but is jBPM related and fixed in the upcomming 3.2.4 afaik.

                          You know, I nearly gave up using Seam because of this issue, trying to re-implement the process in "pure" jBPM. But if it is a jBPM's issue, are you saying that Timers cannot be used with States? Sounds like an ultra-critical issue to me.

                          btw, you could configure jBPM to *not* use transactions or use it's own transactions instead of using the seam provided one.


                          I would do anything, but I'm lost at what are the alternatives.
                          I need to persist a state into DB. The only proper way to do that (is it so?) is to use State + Timer like I did. But you're saying it's not available till 3.2.4.

                          If you could suggest how to persist the state in a decision loop (with or without States) in order to get rid of StackOverflow I would be grateful.


                          • 10. Re: workaround for StackOverflow exception
                            kukeltje

                             

                            You know, I nearly gave up using Seam because of this issue, trying to re-implement the process in "pure" jBPM. But if it is a jBPM's issue, are you saying that Timers cannot be used with States?


                            No, the problem is when jBPM is not the transactionmanager (afaik). It is already fixed in the svn trunk of jBPM (again, afaik, not tested it myself)

                            Pure jBPM should work, or even in combination with Seam. Just configure jBPM to not participate in an already running transaction



                            • 11. Re: workaround for StackOverflow exception
                              vanyatka

                               

                              Pure jBPM should work, or even in combination with Seam. Just configure jBPM to not participate in an already running transaction

                              It is kind of confusing to distinguish jBPM transactions from Seam + EJB3-JPA.
                              I thought jBPM doesn't meddle with application level transactions, only with it's own state persisting.

                              I've tried removing this line from jbpm.cfg.xml

                              <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />


                              But get this exception

                              13:43:34,852 ERROR [Services] problem closing service 'persistence'
                              org.jbpm.JbpmException: no jbpm tx service configured
                               at org.jbpm.persistence.db.DbPersistenceService.isRollbackOnly(DbPersistenceService.java:395)
                               at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:202)
                               at org.jbpm.svc.Services.close(Services.java:225)
                               at org.jbpm.JbpmContext.close(JbpmContext.java:139)
                               at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:262)
                               at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72)
                               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:597)
                               at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                               at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
                               at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
                               at org.jboss.seam.Component.newInstance(Component.java:1976)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
                               at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
                               at org.jboss.seam.init.Initialization.init(Initialization.java:596)
                               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
                               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                               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:597)
                               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
                               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:597)
                               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                               at org.jboss.web.WebModule.startModule(WebModule.java:83)
                               at org.jboss.web.WebModule.startService(WebModule.java:61)
                               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                               at sun.reflect.GeneratedMethodAccessor1376.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                               at $Proxy0.start(Unknown Source)
                               at org.jboss.system.ServiceController.start(ServiceController.java:417)
                               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy194.start(Unknown Source)
                               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                               at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy195.start(Unknown Source)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                               at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy9.deploy(Unknown Source)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
                              13:43:34,855 ERROR [[/BannerChainSeamNew]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                              org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
                               at org.jboss.seam.Component.newInstance(Component.java:1986)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
                               at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
                               at org.jboss.seam.init.Initialization.init(Initialization.java:596)
                               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
                               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                               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:597)
                               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
                               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:597)
                               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                               at org.jboss.web.WebModule.startModule(WebModule.java:83)
                               at org.jboss.web.WebModule.startService(WebModule.java:61)
                               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                               at sun.reflect.GeneratedMethodAccessor1376.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                               at $Proxy0.start(Unknown Source)
                               at org.jboss.system.ServiceController.start(ServiceController.java:417)
                               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy194.start(Unknown Source)
                               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                               at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy195.start(Unknown Source)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                               at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:597)
                               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                               at $Proxy9.deploy(Unknown Source)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
                              Caused by: org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.JbpmException: no jbpm tx service configured}
                               at org.jbpm.svc.Services.close(Services.java:245)
                               at org.jbpm.JbpmContext.close(JbpmContext.java:139)
                               at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:262)
                               at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72)
                               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:597)
                               at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                               at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
                               at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
                               at org.jboss.seam.Component.newInstance(Component.java:1976)
                               ... 94 more
                              Caused by: org.jbpm.JbpmException: no jbpm tx service configured
                               at org.jbpm.persistence.db.DbPersistenceService.isRollbackOnly(DbPersistenceService.java:395)
                               at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:202)
                               at org.jbpm.svc.Services.close(Services.java:225)
                               ... 106 more
                              


                              • 12. Re: workaround for StackOverflow exception
                                petia

                                I have a problem with setting a timer on a Task Node.

                                I have defined the following process

                                <?xml version="1.0" encoding="UTF-8"?>
                                <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="timer-test">
                                 <swimlane name="Initiator">
                                 <assignment actor-id="admin"></assignment>
                                 </swimlane>
                                
                                 <start-state name="start-state1">
                                 <task name="start task" swimlane="Initiator"></task>
                                 <transition to="TaskA"></transition>
                                 </start-state>
                                
                                 <task-node name="TaskA">
                                 <task name="TaskA">
                                 <assignment actor-id="petia"></assignment>
                                 </task>
                                 <timer duedate="10 seconds" transition="skipB"></timer>
                                 <transition to="TaskB" name="execute B"></transition>
                                 <transition to="end-state1" name="skipB"></transition>
                                 </task-node>
                                
                                 <task-node name="TaskB">
                                 <task name="TaskB">
                                 <assignment actor-id="petia"></assignment>
                                 </task>
                                 <transition to="end-state1"></transition>
                                 </task-node>
                                
                                 <end-state name="end-state1"></end-state>
                                </process-definition>
                                


                                The idea is that if the timer in Task Node TaskA expires the process will be ended (and the Task Node TaskB skipped).

                                However, when running the process and the timer expires, the transition skipB is not executed (as specified in the code) and the process stalls at Task Node TaskA (which appears in the tasks list, but without an "End" button available for it).

                                I am running jBPM 3.2.3. From the discussions above I can see that there have been some problems with timers on State Nodes which have been fixed in 3.2.4. Does this apply to my problem with timers on task nodes? Have anyone else had similar problem or am I doing something wrong?

                                Help is appreciated. Thanks in advance.
                                Kind regards, Petia


                                • 13. Re: workaround for StackOverflow exception
                                  kukeltje

                                  unrelated to the main topic. Please start a new topic since it is easier to find for others then

                                  • 14. Re: workaround for StackOverflow exception
                                    aguizar

                                    JBSEAM-1575 depends on JBPM-1135 which is already resolved. That said, I have two suggestions.

                                    The first is to replace the timer with an asynchronous continuation, unless you need the delay (which I understand you do not). Just set the node's async attribute to true. It does not need to be a separate emtpy state, you can decorate any of your existing nodes with that attribute.

                                    The second is to implement a ThreadLocal based solution which prevents recursive calls once the loop node is reached. I came to it for preventing the stack overflow in the BPEL while activity, but it can be implemented for jPDL as well. You can browse the code in the online repository. Look at Loop.execute(). It is much of a hack - you might want to stick to asynchronous continuations unless you need more performance.

                                    1 2 Previous Next