9 Replies Latest reply on Jul 3, 2008 3:26 AM by Mark Torres

    Seam, Spring and jBPM @BeginTask

    Frank Bitzer Newbie

      Hello,


      I integrated the jBPM example from Seam reference (http://docs.jboss.com/seam/2.0.1.GA/reference/en/html/tutorial.html, Chapter 1.4) into my existing and working web application (this means, I simply added the two screens and the two java classes from the example and of course the needed libraries and configuration).


      The application uses JSF with Facelets, Seam and Spring.


      The jBPM engine seams to work in general, too. I am able to create process instances and to list tasks in the pooledTaskList etc. (I testet this with an example apart from the one from the seam reference).


      However, in any case, when I call a method that is annotated with a
      @BeginTask, it blows up with a StackOverflow. The stacktrace is very long, below you can find some fragments.


      The stackoverflow occurs both with JBoss AS (the one included in the jBPM 3.1.4 starterkit) and Tomcat.


      Any ideas? Is it because of Spring? Or is something wrong with el-api?



      part of stacktrace...


         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at or
      :21,399 INFO  [STDOUT] g.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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.java:70)
         at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
         at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
         at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         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:2082)
         at org.jboss.seam.Component.unwrap(Component.java:2108)
         at org.jboss.seam.Component.getInstance(Component.java:1887)
         at org.jboss.seam.Component.getInstance(Component.java:1852)
         at org.jboss.seam.Component.getInstance(Component.java:1829)
         at org.jboss.seam.Component.getInstance(Component.java:1824)
         at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
         at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:
      218)
         at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:
      205)
         at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:56)
         at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
         at org.jboss.seam.Component.getInstance(Component.java:1839)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
         at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
         at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
         at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
         at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
         at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
         at org.jboss.seam.ioc.spring.SpringTransaction.begin(SpringTransaction.ja
           


        • 1. Re: Seam, Spring and jBPM @BeginTask
          youngm Novice

          Can you use a debugger to what component is causing the loop?  Try looking at the Component.getInstance methods to see what is being pulled down.


          If you can give some good debug info as to the cause of the loop that would help.


          Mike

          • 2. Re: Seam, Spring and jBPM @BeginTask
            Frank Bitzer Newbie

            Well, where exactly should I set the breakpoints?


            I was not able to find the root cause or the exeption that is thrown at very first before it is running in the loop that causes the stackoverflow :(


            Also, because of the stackoverflow the seam debug page never occurs.

            • 3. Re: Seam, Spring and jBPM @BeginTask
              Frank Bitzer Newbie

              OK, somewhere I read that the problem might exist because I have two hibernate sessions, one for my application itself and one for the jBPM engine.


              Therefore, I deferred the solution for this problem. Currently, I am trying to unify my sessionFactories, which is not a trivial task in the case of my application. If you are interested in, see a new thread I created in this forum.

              • 4. Re: Seam, Spring and jBPM @BeginTask
                youngm Novice

                After thinking about it this issue is probably the cause of your problem.


                http://jira.jboss.com/jira/browse/JBSEAM-2702

                • 5. Re: Seam, Spring and jBPM @BeginTask
                  Frank Bitzer Newbie

                  Well, I finished my integration for now and unified the hibernate sessions.


                  However, the StackOverflow still occurs.


                  So it would be great if you could provide a quick public fix to the issue you mentioned :)

                  • 6. Re: Seam, Spring and jBPM @BeginTask
                    Mark Torres Newbie

                    This happened to me as well, I got the stacktrace error when trying to make a transition on my process-definition to a state/node that does not exist. I got a very long exception which obstructed the true cause of the problem.


                    Here's the part with the exception. As a work around, I checked server.log in jboss app server to figure the actual cause of the exception.


                    Caused by: java.lang.StackOverflowError
                         at java.security.AccessController.doPrivileged(Native Method)
                         at java.io.PrintWriter.<init>(PrintWriter.java:78)
                         at java.io.PrintWriter.<init>(PrintWriter.java:62)
                         at org.apache.log4j.spi.VectorWriter.<init>(ThrowableInformation.java:80)
                         at org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:58)
                         at org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:342)
                         at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:304)
                         at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)
                         at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
                         at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
                         at org.apache.log4j.Category.callAppenders(Category.java:203)
                         at org.apache.log4j.Category.forcedLog(Category.java:388)
                         at org.apache.log4j.Category.log(Category.java:853)
                         at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:597)
                         at org.apache.commons.logging.impl.Log4jProxy.log(Log4jProxy.java:301)
                         at org.apache.commons.logging.impl.Log4jProxy.error(Log4jProxy.java:283)
                         at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:208)
                         at org.hibernate.transaction.JDBCTransaction.notifyLocalSynchsBeforeTransactionCompletion(JDBCTransaction.java:231)
                         at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:109)
                         at org.jboss.seam.transaction.HibernateTransaction.commit(HibernateTransaction.java:108)
                         at org.jboss.seam.util.Work.workInTransaction(Work.java:45)
                         at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
                         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
                         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:2089)
                         at org.jboss.seam.Component.unwrap(Component.java:2115)
                         at org.jboss.seam.Component.getInstance(Component.java:1887)
                         at org.jboss.seam.Component.getInstance(Component.java:1852)
                         at org.jboss.seam.Component.getInstance(Component.java:1829)
                         at org.jboss.seam.Component.getInstance(Component.java:1824)
                         at org.jboss.seam.bpm.TaskInstance.instance(TaskInstance.java:64)
                         at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:231)
                         at org.jboss.seam.contexts.BusinessProcessContext.flush(BusinessProcessContext.java:145)
                         at org.jboss.seam.bpm.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:114)
                         at org.hibernate.transaction.JDBCTransaction.notifyLocalSynchsBeforeTransactionCompletion(JDBCTransaction.java:228)
                         at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:109)
                         at org.jboss.seam.transaction.HibernateTransaction.commit(HibernateTransaction.java:108)
                         at org.jboss.seam.util.Work.workInTransaction(Work.java:45)
                         at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
                         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
                         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:2089)
                         at org.jboss.seam.Component.unwrap(Component.java:2115)
                         at org.jboss.seam.Component.getInstance(Component.java:1887)
                         at org.jboss.seam.Component.getInstance(Component.java:1852)
                         at org.jboss.seam.Component.getInstance(Component.java:1829)
                         at org.jboss.seam.Component.getInstance(Component.java:1824)
                         at org.jboss.seam.bpm.TaskInstance.instance(TaskInstance.java:64)
                         at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:231)
                         at org.jboss.seam.contexts.BusinessProcessContext.flush(BusinessProcessContext.java:145)
                         at org.jboss.seam.bpm.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:114)
                         at org.hibernate.transaction.JDBCTransaction.notifyLocalSynchsBeforeTransactionCompletion(JDBCTransaction.java:228)
                         at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:109)
                         at org.jboss.seam.transaction.HibernateTransaction.commit(HibernateTransaction.java:108)
                         at org.jboss.seam.util.Work.workInTransaction(Work.java:45)
                         at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
                         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
                         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:2089)
                         at org.jboss.seam.Component.unwrap(Component.java:2115)
                         at org.jboss.seam.Component.getInstance(Component.java:1887)
                         at org.jboss.seam.Component.getInstance(Component.java:1852)
                         at org.jboss.seam.Component.getInstance(Component.java:1829)
                         at org.jboss.seam.Component.getInstance(Component.java:1824)
                         at org.jboss.seam.bpm.TaskInstance.instance(TaskInstance.java:64)
                         at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:231)
                         at org.jboss.seam.contexts.BusinessProcessContext.flush(BusinessProcessContext.java:145)
                         at org.jboss.seam.bpm.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:114)
                         at org.hibernate.transaction.JDBCTransaction.notifyLocalSynchsBeforeTransactionCompletion(JDBCTransaction.java:228)
                         at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:109)
                         at org.jboss.seam.transaction.HibernateTransaction.commit(HibernateTransaction.java:108)
                         at org.jboss.seam.util.Work.workInTransaction(Work.java:45)
                         at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
                         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
                         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)
                    


                    • 7. Re: Seam, Spring and jBPM @BeginTask
                      Mark Torres Newbie

                      I did more digging into this, the problem was calls to BusinessProcsessContext.flush() was causing an infinite recursion when additions or removals are not empty.

                      • 8. Re: Seam, Spring and jBPM @BeginTask
                        Schevus Osborne Newbie

                        What do you mean by additions or removals not being empty? I am having this problem on a flush() call as well.

                        • 9. Re: Seam, Spring and jBPM @BeginTask
                          Mark Torres Newbie

                          Inside BusinessProcessContext.flush(), whenever the method enters this if statement



                           if ( !additions.isEmpty() || !removals.isEmpty() )
                           {
                          ...
                           }



                          it was causing a StackOverflow, in my case.


                          To work around this, I avoided outjecting my process variables, and instead set it within my component.


                          Eg.