2 Replies Latest reply on Jan 18, 2007 10:19 AM by Juan Giovanolli

    problem persisting a processinstance

    Juan Giovanolli Newbie

      hi:
      i'm working with jbpm 3.1.3, and i'm getting this error when i try to persist a processInstance:

      18:32:39,703 INFO [STDOUT] Hibernate: select processdef0_.ID_ as ID1_522_, processdef0_.NAME_ as NAME2_522_, processdef0_.VERSION_ as VERSION3_522_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_522_, processdef0_.STARTSTATE_ as STARTSTATE5_522_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ?
      18:32:39,703 INFO [STDOUT] Hibernate: insert into JBPM_TOKEN (VERSION_, NAME_, START_, END_, NODEENTER_, NEXTLOGINDEX_, ISABLETOREACTIVATEPARENT_, ISTERMINATIONIMPLICIT_, ISSUSPENDED_, NODE_, PROCESSINSTANCE_, PARENT_, SUBPROCESSINSTANCE_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
      18:32:39,703 INFO [STDOUT] Hibernate: insert into JBPM_PROCESSINSTANCE (VERSION_, START_, END_, ISSUSPENDED_, PROCESSDEFINITION_, ROOTTOKEN_, SUPERPROCESSTOKEN_) values (?, ?, ?, ?, ?, ?, ?)
      18:32:39,718 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, CLASS_) values (?, ?, ?, ?, 'I')
      18:32:39,734 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.def.SuperState - this operation breaks ==
      18:32:39,750 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.def.SuperState - this operation breaks ==
      18:32:39,765 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.def.SuperState - this operation breaks ==
      18:32:39,812 INFO [STDOUT] Hibernate: delete from JBPM_TIMER where PROCESSINSTANCE_=?
      18:32:58,750 INFO [STDOUT] Hibernate: insert into JBPM_VARIABLEINSTANCE (NAME_, CONVERTER_, TOKEN_, TOKENVARIABLEMAP_, PROCESSINSTANCE_, STRINGVALUE_, CLASS_) values (?, ?, ?, ?, ?, ?, 'S')
      18:32:58,750 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, VARIABLEINSTANCE_, CLASS_) values (?, ?, ?, ?, ?, 'R')
      18:32:58,750 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, VARIABLEINSTANCE_, OLDSTRINGVALUE_, NEWSTRINGVALUE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'U')
      18:32:58,750 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, TRANSITION_, CLASS_) values (?, ?, ?, ?, ?, 'S')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, TRANSITION_, SOURCENODE_, DESTINATIONNODE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'T')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, NODE_, ENTER_, LEAVE_, DURATION_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, ?, 'N')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, TRANSITION_, SOURCENODE_, DESTINATIONNODE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'T')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, NODE_, ENTER_, LEAVE_, DURATION_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, ?, 'N')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, TRANSITION_, SOURCENODE_, DESTINATIONNODE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'T')
      18:32:58,765 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, NODE_, ENTER_, LEAVE_, DURATION_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, ?, 'N')
      18:32:58,781 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, TRANSITION_, SOURCENODE_, DESTINATIONNODE_, CLASS_) values (?, ?, ?, ?, ?, ?, ?, 'T')
      18:32:58,781 INFO [STDOUT] Hibernate: insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_, CLASS_) values (?, ?, ?, ?, 'X')
      18:32:58,781 ERROR [PhaseListenerManager] Exception in PhaseListener INVOKE_APPLICATION(5) afterPhase
      java.lang.IllegalStateException: Could not commit transaction
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:321)
       at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPhase(TransactionalSeamPhaseListener.java:45)
       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:85)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:345)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=santexintel09/83, BranchQual=, localId=83] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.context.exe.TokenVariableMap)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
       at org.jboss.tm.TxManager.commit(TxManager.java:240)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:310)
       ... 41 more
      Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.context.exe.TokenVariableMap
       at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
       at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
       at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
       at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:482)
       at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3056)
       at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:474)
       at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197)
       at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
       at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
       at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
       at org.jboss.seam.core.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:96)
       at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
       at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
       ... 44 more
      


      i cannot add more code because who persist the procesInstance is Seam.
      jbpm & seam coders: work toghether in this.