Good Day,

I am trying to send a messages in a transaction from the client but this cause 
an exception of the server indicating that there would be a duplicate key 
violation on JMS_MESSAGE_REFERENCE primary key.

The client application only commits the transaction once 1000 messages have 
been sent to the server.

I have tried wrapping the MDB that consumes the event in a transaction in the 
ejb-jar.xml and I have also tried without a transaction defined but with no 
luck.

2006-06-21 13:30:00,593 ERROR 
[org.jboss.jms.server.endpoint.ServerConnectionEndpoint] Exception occured
java.sql.BatchUpdateException: The statement was aborted because it would have 
caused a duplicate key value in a unique or primary key constraint or unique 
index identified by 'PK_JMS_MESSAGE_REFERENCE' defined on 
'JMS_MESSAGE_REFERENCE'.
        at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown 
Source)
        at 
org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:517)
        at 
org.jboss.messaging.core.plugin.JDBCPersistenceManager.handleBeforeCommit1PC(JDBCPersistenceManager.java:2650)
        at 
org.jboss.messaging.core.plugin.JDBCPersistenceManager$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:4331)
        at org.jboss.messaging.core.tx.Transaction.commit(Transaction.java:171)
        at 
org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:390)
        at 
org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:99)
        at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
        at 
org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
        at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
        at 
org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:842)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:691)
        at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:443)
        at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:516)
        at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:253)

Regards,
Mark P Ashworth

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

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


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to