[jboss-user] [JBoss Messaging] - Database Unique Constraint Violation on JBM_MSG MESSAGE_ID

jkemp83 do-not-reply at jboss.com
Fri Dec 12 14:35:19 EST 2008


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!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196317#4196317

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196317



More information about the jboss-user mailing list