Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32B889662 for ; Tue, 3 Jan 2012 13:06:25 +0000 (UTC) Received: (qmail 51830 invoked by uid 500); 3 Jan 2012 13:06:25 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 51805 invoked by uid 500); 3 Jan 2012 13:06:25 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 51798 invoked by uid 99); 3 Jan 2012 13:06:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 13:06:25 +0000 X-ASF-Spam-Status: No, hits=-2001.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 13:06:24 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C2B57136F23 for ; Tue, 3 Jan 2012 13:05:39 +0000 (UTC) Date: Tue, 3 Jan 2012 13:05:39 +0000 (UTC) From: "Marcin (Created) (JIRA)" To: issues@camel.apache.org Message-ID: <71446718.321.1325595939799.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CAMEL-4854) BAM - database constraint violation when restaring application MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 BAM - database constraint violation when restaring application -------------------------------------------------------------- Key: CAMEL-4854 URL: https://issues.apache.org/jira/browse/CAMEL-4854 Project: Camel Issue Type: Bug Components: camel-bam Affects Versions: 2.8.2 Reporter: Marcin Take BAM example from http://camel.apache.org/bam-example.html (or any other one, it doesn't matter). Here is the one I'm using: ActivityBuilder request = activity("eaiBroker:topic:SOME_TOPIC?concurrentConsumers=1").name("Request") .correlate(xpath("/MessageRequest/@Id").stringResult()); ActivityBuilder response = activity("eaiBroker:topic:SOME_OTHER_TOPIC?concurrentConsumers=1").name("Response") .correlate(xpath("MessageResponse/@Id").stringResult()); response .starts().after(request.completes()) .expectWithin(seconds(15)) .errorIfOver(seconds(30)) .to("log:com.eai?level=error"); First run of the application and everything works. Restart application and try to activate one of BAM rules, there will be an exception that database constraint has been violated. Every time application is started, Camel tries to do following sql insert insert into CAMEL_ACTIVITYDEFINITION (name, processDefinition_id, id) values (?, ?, ?) but name columne must be unique in CAMEL_ACTIVITYDEFINITION . Workaround for this is to purge BAM tables every time you want to restart the application, but it's not a solution. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira