Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 989FE108BE for ; Wed, 3 Jul 2013 13:00:36 +0000 (UTC) Received: (qmail 9568 invoked by uid 500); 3 Jul 2013 13:00:36 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 9519 invoked by uid 500); 3 Jul 2013 13:00:36 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Delivered-To: moderator for dev@activemq.apache.org Received: (qmail 28831 invoked by uid 99); 3 Jul 2013 12:22:40 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Date: Wed, 3 Jul 2013 05:21:15 -0700 (PDT) From: ajay To: dev@activemq.apache.org Message-ID: <1372854075195-4668835.post@n4.nabble.com> Subject: Activemq - Duplicate Message persistence MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I am getting following Exception when trying to save multiple messages using activemq in jms session commit. ERROR [STDERR] Caused by: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__ACTIVEMQ__3214EC2707020F21'. Cannot insert duplicate key in object 'dbo.ACTIVEMQ_MSGS'. 2013-07-03 17:06:02,261 ERROR [STDERR] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(Unknown Source) 2013-07-03 17:06:02,261 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:519) 2013-07-03 17:06:02,261 ERROR [STDERR] at org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:103) 2013-07-03 17:06:02,261 ERROR [STDERR] at org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:81) 2013-07-03 17:06:02,261 ERROR [STDERR] at org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:166) 2013-07-03 17:06:02,261 ERROR [STDERR] ... 18 more 2013-07-03 17:06:02,263 ERROR [STDERR] Caused by: javax.transaction.xa.XAException: STORE COMMIT FAILED: Transaction rolled back. 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:77) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:173) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:420) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:306) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69) 2013-07-03 17:06:02,263 ERROR [STDERR] at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:218) 2013-07-03 17:06:02,263 ERROR [STDERR] ... 5 more Please let me know any code changes to be made in activemq persistence to avoid persistence of duplicate messages.Its urgent!!!!!!!! activemq table design has primary key with identity still it throws exception.any configuration changes needs to be made on database table creation side or any changes in activemq persistence in clusters? Need ur valuable information. Thanks,, Ajay.V -- View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-Duplicate-Message-persistence-tp4668835.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.