Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2950

HibernateException is thrown during concurrent Timers persistence

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • jBPM 3.2.10
    • jBPM 3.2.5.SP5
    • Runtime Engine
    • None

    Description

      We deploy ProcessDefinition on application startup and use this one persisted instance during application activity in several threads (i.e. during full application live time). We noticed that during concurrent Timers creation for several processes which build from this ProcessDefinition instance we've got:

      org.hibernate.HibernateException: identifier of an instance of org.jbpm.graph.def.Action was altered from 532 to 533

      After investigation I've noticed that Action instance is persisted anew (not updated) in concurrent threads and new row appears in the table. The problematic place is in org.jbpm.db.JobSession.saveJob where Action is checked on existence in Hibernate Session's persistent context. The suggested fix is to changed condition:

      !session.contains(action)

      to

      action.getId() == 0L

      This change fixes our problem.

      Attachments

        Activity

          People

            marco.rietveld Marco Rietveld (Inactive)
            borislav.andruschuk Borislav Andruschuk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: