StaleObjectStateException while executing a jBPM process containing a fork/join on SOA-P.

Solution Unverified - Updated -

Issue

  • Executing a jBPM process with a fork fails with the following exception:
ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.context.exe.ContextInstance#123]
        at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1782)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
        at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2325)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2625)
        at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1030)
        at org.jboss.soa.esb.services.jbpm.integration.command.AbstractMessageListener.onMessage(AbstractMessageListener.java:77)
        at org.jboss.soa.esb.services.jbpm.integration.command.JobListener.onMessage(JobListener.java:16)
  • The race condition is sometimes happening on ContextInstance, sometimes on TokenVariableMap.

Environment

  • Red Hat JBoss SOA Platform (SOA-P)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.