JDBC SQL exception in JBoss logs

Solution Unverified - Updated -

Issue

  • The server.log shows below SQL exceptions:
WARN  [org.jboss.messaging.core.impl.JDBCSupport] (ajp-clcustom1prod%2F10.10.10.10-8109-20) SQLException caught, SQLState 23000 code:1062- assuming deadlock detected, try:26
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1-345' for key 'PRIMARY'
    at sun.reflect.GeneratedConstructorAccessor447.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
...
...
    at org.jboss.messaging.core.impl.JDBCPersistenceManager.cacheID(JDBCPersistenceManager.java:1967)
    at org.jboss.messaging.core.impl.JDBCPersistenceManager$1AddReferenceRunner.doTransaction(JDBCPersistenceManager.java:1632)
    at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:658)
    at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:698)
    at org.jboss.messaging.core.impl.JDBCPersistenceManager.addReference(JDBCPersistenceManager.java:1686)
    at org.jboss.messaging.core.impl.ChannelSupport.handle(ChannelSupport.java:239)
    at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.routeInternal(MessagingPostOffice.java:3163)
    at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.route(MessagingPostOffice.java:980)
...
...

2013-05-10 17:45:57,161 ERROR [org.jboss.messaging.core.impl.JDBCSupport] (ajp-clcustom1prod%2F10.159.77.30-8109-20) Retried 25 times, now giving up
2013-05-10 17:45:57,165 ERROR [org.jboss.messaging.core.impl.JDBCSupport] (ajp-clcustom1prod%2F10.159.77.30-8109-20) JDBCPersistenceManager[7c062b5d] Fatal DB error happened. Error Failed to execute transaction

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.1.x
  • MySQL DB
    • 5.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