5 Replies Latest reply on Sep 10, 2008 6:40 AM by Ronald van Kuijk

    Error while adding variables to execution context

    mlsreekanth Newbie

      Hello All,

      I have been successfully using jbpm-jpdl-3.2.GA till now. Few days back, database server was down suddenly because of data storage issue. After that, i am seeing very peculiar errors from JBPM as follows,

      Caused by: org.hibernate.TransientObjectException: org.jbpm.context.exe.TokenVariableMap
      at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:216)
      at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
      at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:221)
      at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:476)
      at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:2900)
      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:195)
      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:993)
      at org.jbpm.persistence.db.DbPersistenceService.flushSession(DbPersistenceService.java:272)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:232)

      From the above stack-trace i understand that JBPM runtime information such as token, context instance etc,,, are in-correct.

      How can i correct the database? Could you please shed some light?
      I am literally dying here as production server is down because of this issue.

        • 1. Re: Error while adding variables to execution context
          Ronald van Kuijk Master

          hmm... this is such a low level issue that I'm not sure how to fix it.

          What you should do is see on what tokens this happens and see if for that token and all related variables, the id's and all related fields (see the datamodel in the sticky post in this forum) etc contain wrong errors. This can be done by comparing to entries that are correct.

          There is no database repair or 'check validity' script (unfortunately)

          Ronald

          • 2. Re: Error while adding variables to execution context
            mlsreekanth Newbie

            Hello Ronald,

            Thank you for your quick response. Somehow i am able to match the relations and tried correcting the missing relation (NULL values) and got the system stable.

            But, I think it is necessary to have a validation routines/scripts (could be optional , can be enabled by configuration) to validate the process execution data before starting the actual work to reduce the problems in this kind of scenarios.

            I am interested to work on this use case and shortly i will post the implementation considerations for this use case.

            Thank you.

            • 3. Re: Error while adding variables to execution context
              Ronald van Kuijk Master

              Could it be that the basic config of jBPM dit not use wel configured transactions?

              If transactions (in your opinion) were configured correctly, please file a jira issue then for some validation software. Lets see what comes out. Please also describe your case (the cause, configuration etc) in it.

              • 4. Re: Error while adding variables to execution context
                mlsreekanth Newbie

                Hello Ronald,

                Being precise, here is our setup.

                JBPM 3.2.GA,
                Jboss Seam 1.2.GA and
                Tomohawk , myfaces

                on jboss 4.0.5.GA along with mysql 5.0.24 on RHEL 4 update 4.

                If i am wrong please correct me. Jboss seam transaction handling is not much fine grained to handle EJB3 transactions and JBPM transactions together in 1.2.X versions of Seam. But, i have read that it is better in Seam 2.X, but as we have seen that upgrading to newer version of Seam is not much easy at this point of time, we are still living with this kind of transactional issues.

                Anyway, i'll prepare the testcases to demonstrate the issue eventhough it is bit difficult as in our implementation JBPM is tightly coupled with EJB3 model.



                • 5. Re: Error while adding variables to execution context
                  Ronald van Kuijk Master

                  If you seem to have problems related to jBPM and Seam, you stand a better change of more detailed help in the seam forum. A combination of ejb3, jBPM and Seam 1.2 is not our (my) field of expertise.