0 Replies Latest reply on Dec 30, 2010 4:44 PM by Paulo Costa

    SEAM 2.2 Tomcat6 jbpm3 - ERROR - exception calling user Synchronization java.lang.IllegalStateException: Transaction already active

    Paulo Costa Newbie

      ERROR - exception calling user Synchronization java.lang.IllegalStateException: Transaction already active

       

      Dear Sirs. i have a seam project 2.2 GA with tomcat 6 . and it work well.

      Now i want to integrate jbpm and seam on tomcat6

       

      and i have the jbpm 3.2.2. and i have configured the

       

      hibernate.cfg.xml like:

          <!-- hibernate dialect -->

          <property>org.hibernate.dialect.Oracle9Dialect</property>

       

          <!-- JDBC connection properties (begin) -->

         <!--

          <property>oracle.jdbc.driver.OracleDriver</property>

          <property>jdbc:oracle:thin:@132.10.18.248:1521:siga</property>

          <property>seamt</property>

          <property>seamt</property> -->

       

          <!-- JDBC connection properties (end) -->

          <!-- DataSource properties (begin) -->

          <property>java:comp/env/jdbc/SigaDS</property>

          <!--  DataSource properties (end) -->

       

      jbpm.cfg.xml like:

       

      <jbpm-configuration>

        <jbpm-context>

          <service>

             <factory>

                <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">

                   <field><false/></field>

                </bean>

             </factory>

          </service>

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

          <service factory="org.jbpm.msg.db.DbMessageServiceFactory" />

          <service factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />

          <service factory="org.jbpm.logging.db.DbLoggingServiceFactory" />

         <service factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />

        </jbpm-context>

      </jbpm-configuration>

       

       

      I was doing some test but it came this error and i'm looking for help :

       

      Its persist some transactions before , but .....

       

      DEBUG -

          /* named HQL query TaskMgmtSession.findTaskInstancesByActorId */ select

              taskinstan0_.ID_ as ID1_507_,

              taskinstan0_.VERSION_ as VERSION3_507_,

              taskinstan0_.NAME_ as NAME4_507_,

              taskinstan0_.DESCRIPTION_ as DESCRIPT5_507_,

              taskinstan0_.ACTORID_ as ACTORID6_507_,

              taskinstan0_.CREATE_ as CREATE7_507_,

              taskinstan0_.START_ as START8_507_,

              taskinstan0_.END_ as END9_507_,

              taskinstan0_.DUEDATE_ as DUEDATE10_507_,

              taskinstan0_.PRIORITY_ as PRIORITY11_507_,

              taskinstan0_.ISCANCELLED_ as ISCANCE12_507_,

              taskinstan0_.ISSUSPENDED_ as ISSUSPE13_507_,

              taskinstan0_.ISOPEN_ as ISOPEN14_507_,

              taskinstan0_.ISSIGNALLING_ as ISSIGNA15_507_,

              taskinstan0_.ISBLOCKING_ as ISBLOCKING16_507_,

              taskinstan0_.TASK_ as TASK17_507_,

              taskinstan0_.TOKEN_ as TOKEN18_507_,

              taskinstan0_.PROCINST_ as PROCINST19_507_,

              taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN20_507_,

              taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM21_507_

          from

              JBPM_TASKINSTANCE taskinstan0_

          where

              taskinstan0_.ACTORID_=?

              and taskinstan0_.ISSUSPENDED_=0

              and taskinstan0_.ISOPEN_=1

      TRACE - binding 'demo' to parameter: 1

      TRACE - returning '18' as column: ID1_507_

      ERROR - exception calling user Synchronization

      java.lang.IllegalStateException: Transaction already active

            at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:35)

            at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)

            at org.jboss.seam.util.Work.workInTransaction(Work.java:44)

            at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)

            at sun.reflect.GeneratedMethodAccessor282.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:22)

            at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

            at org.jboss.seam.Component.callComponentMethod(Component.java:2249)

            at org.jboss.seam.Component.unwrap(Component.java:2275)

            at org.jboss.seam.Component.getInstance(Component.java:2041)

            at org.jboss.seam.Component.getInstance(Component.java:2000)

            at org.jboss.seam.Component.getInstance(Component.java:1994)

            at org.jboss.seam.Component.getInstance(Component.java:1967)

            at org.jboss.seam.Component.getInstance(Component.java:1962)

            at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)

            at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)

            at org.jboss.seam.contexts.BusinessProcessContext.flush(BusinessProcessContext.java:160)

            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.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)

            at org.jboss.seam.transaction.EntityTransaction.commit(EntityTransaction.java:110)

            at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)

            at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:604)

            at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:345)

            at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)

            at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)

            at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)

            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)

            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)

            at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

            at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

            at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

            at java.lang.Thread.run(Thread.java:595)

      ERROR - exception calling user Synchronization

      java.lang.IllegalStateException: Transaction already active

            at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:35)

            at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)

            at org.jboss.seam.util.Work.workInTransaction(Work.java:44)

            at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)

            at sun.reflect.GeneratedMethodAccessor282.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:22)

            at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

            at org.jboss.seam.Component.callComponentMethod(Component.java:2249)

            at org.jboss.seam.Component.unwrap(Component.java:2275)

            at org.jboss.seam.Component.getInstance(Component.java:2041)

            at org.jboss.seam.Component.getInstance(Component.java:2000)

            at org.jboss.seam.Component.getInstance(Component.java:1994)

            at org.jboss.seam.Component.getInstance(Component.java:1967)

            at org.jboss.seam.Component.getInstance(Component.java:1962)

            at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)

            at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)

            at org.jboss.seam.contexts.BusinessProcessContext.flush(BusinessProcessContext.java:160)

            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.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)

            at org.jboss.seam.transaction.EntityTransaction.commit(EntityTransaction.java:110)

            at org.jboss.seam.util.Work.workInTransaction(Work.java:58)

            at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)

            at sun.reflect.GeneratedMethodAccessor282.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:22)

            at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

            at org.jboss.seam.Component.callComponentMethod(Component.java:2249)

            at org.jboss.seam.Component.unwrap(Component.java:2275)

            at org.jboss.seam.Component.getInstance(Component.java:2041)

            at org.jboss.seam.Component.getInstance(Component.java:2000)

            at org.jboss.seam.Component.getInstance(Component.java:1994)

            at org.jboss.seam.Component.getInstance(Component.java:1967)

            at org.jboss.seam.Component.getInstance(Component.java:1962)

            at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)

            at org.jboss.seam.bpm.BusinessProcess.hasActiveProcess(BusinessProcess.java:64)

            at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:347)

            at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:129)

            at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:514)

            at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)

            at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)

            at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)

            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)

            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)

            at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

            at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

            at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)

            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

            at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)

            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

            at java.lang.Thread.run(Thread.java:595)

      DEBUG -

       

      Thanks in advance