What causes "Unique constraint violation - hibernate_sequence reset after each restart" in BRMS 5.3 ?

Solution Verified - Updated -

Issue

  • After restart of a BRMS instance, when trying to restart a process from the jBPM console, the following error is encountered:
2012-06-28 16:01:31,101 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-127.0.0.1-8080-2) ERROR: duplicate key value violates unique constraint "processinstancelog_pkey"
  Detail: Key (id)=(2) already exists.
2012-06-28 16:01:31,102 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (http-127.0.0.1-8080-2) Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

Connecting to the PostgreSQL database reveals the current value of hibernate_sequence is always reset to 1 after restarting the BRMS instance.

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 5.3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content