0 Replies Latest reply on Oct 19, 2010 7:41 AM by yse4

    jboss 5.1 jms error while sending messages

    yse4

      Hi all,

       

      please can somebody help me with the following error:

       

      Our installation is jboss 5.1.0 (jms standard installation with mysql 5.1 as the message store). We have only 1 jboss with 1 application using this mysql database, no cluster, no replication!
      We observed the following error fortunately only in our test installation some weeks ago when the application tried to send many messages to the queue:

       

      2010-09-29 15:56:40,017 WARN  [org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-80-112) SQLException caught, SQLState 23000 code:1062- assuming deadlock detected, try:1
      com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '0-396' for key 'PRIMARY'
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      ...
      2010-09-29 15:56:40,017 WARN  [org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-80-112) Trying again after a pause
      2010-09-29 15:56:40,262 WARN  [org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-80-112) SQLException caught, SQLState 23000 code:1062- assuming deadlock detected, try:2

       

      and this happend again and again until

       

      2010-09-29 15:56:46,483 ERROR [org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-80-112) Retried 25 times, now giving up
      2010-09-29 15:56:46,483 ERROR [org.jboss.messaging.core.impl.ChannelSupport] (http-0.0.0.0-80-112) Failed to handle message
      java.lang.IllegalStateException: Failed to execute transaction
      ...
      2010-09-29 15:56:46,483 ERROR [org.jboss.messaging.util.ExceptionUtil] (http-0.0.0.0-80-112) SessionEndpoint[sz-m7df9oeg-1-4041afeg-ex5s9t-u2k5o4c5] send [tz-j8if9oeg-1-4041afeg-ex5s9t-u2k5o4c5]
      javax.jms.JMSException: Failed to route Reference[21066032741908496]:RELIABLE to ExportQueue
          at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:757)

       

      When I configured jboss for using mysql I changed also conf\standardjbosscmp-jdbc.xml so: line 26 changed <fk-constraint>false to true (I read somewhere to do so).
      After the error I changed it back to false and then the error couldn't be reproduced anymore.
      My question is now:
      Was this <fk-constraint>true the reason for the error or what else could it be?
      I have to be sure that this error doesn't come again in our production environment when more and more users try to send messages.

       

      Thanks in advance

       

      Peter