1 Reply Latest reply on Dec 12, 2008 5:17 PM by Clebert Suconic

    Database Unique Constraint Violation on JBM_MSG MESSAGE_ID

    Jacob Kemp Newbie

      Our database was throwing unique constraint violations at us when we were trying to place messages on to a persistent queue. I snooped around in some of the jbm tables and noticed the MESSAGE_ID row in the JBM_COUNTER table, which appeared to be stuck at 203911168. I'm not sure if this was a max value or what, but after numerous restarts we ended up just setting this row's next_id to 1. After which everything started working again.

      Has anyone seen this behavior before? Does anyone know what could have been causing this?

      We're curious to know if we're going to need to keep resetting this value every so often or if this is a preventable issue.

      The only thing I can think of that might have generated this error is that we were sometimes deleting from the jbm_msg and jbm_msg_ref tables to clean out unwanted data during an application restart. But without knowing the low-level details of how JBoss messaging works, we're mostly just guessing here.

      Any help on this would be much appreciated.

      Thanks!