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 6FA939D39 for ; Thu, 9 Feb 2012 11:46:51 +0000 (UTC) Received: (qmail 33569 invoked by uid 500); 9 Feb 2012 11:46:51 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 33458 invoked by uid 500); 9 Feb 2012 11:46:50 -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 Received: (qmail 33449 invoked by uid 99); 9 Feb 2012 11:46:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 11:46:50 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qy0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 11:46:45 +0000 Received: by qcsp15 with SMTP id p15so943209qcs.2 for ; Thu, 09 Feb 2012 03:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=MY7L4d/fmtFqIsU/OpzPjuj9lA4SEBe0NRPtnlptxYk=; b=d7QgmOp06nuVGgD/3RIH43PV01zpd/itEuVAkuA9zVX8xmarZbUIur+4HxbitIHimY 4AnpkJHVDA441lokMlDQVfaza7zNLVeVr0XmRoIEk7yWCApt5HJ2WvN7B3RJmXR9TXJW u4yrvFCASMdV/gnFIcTo3SPCydjJlhXDZTuAs= MIME-Version: 1.0 Received: by 10.229.106.221 with SMTP id y29mr1006704qco.88.1328787984861; Thu, 09 Feb 2012 03:46:24 -0800 (PST) Received: by 10.229.32.65 with HTTP; Thu, 9 Feb 2012 03:46:24 -0800 (PST) In-Reply-To: <1328722350877-4370212.post@n4.nabble.com> References: <1328722350877-4370212.post@n4.nabble.com> Date: Thu, 9 Feb 2012 11:46:24 +0000 Message-ID: Subject: Re: Supressing PostgreSQL exceptions for creating tables when tables already exist From: Gary Tully To: dev@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable there is a boolean attribute createTablesOnStartup on the jdbcpersistenceadapter, you could set that to false on subsequent starts once the tables are created. On 8 February 2012 17:32, io42 wrote: > I have a postgres data store working that persists ActiveMQ messages, but > every time that I run my system (which starts up an embedded broker) I ge= t a > lot of long exception messages asserting that my JDBC tables could not be > created because they could already exist. =A0Is there any way to suppress > these exception details from showing up in the logging? =A0This issue alr= eady > appears to have been previously identified > (https://issues.apache.org/jira/browse/AMQ-3189), but I have yet to disco= ver > if anyone has come up with a solution or workaround. =A0Below is some of = the > sample output I keeps seeing. > > > Example output: > > 08 Feb 2012 11:22:13 - Could not create JDBC tables; they could already > exist. Failure was: CREATE TABLE ACTIVEMQ_MSGS(ID BIGINT NOT NULL, CONTAI= NER > VARCHAR(250), MSGID_PROD VARCHAR(250), MSGID_SEQ BIGINT, EXPIRATION BIGIN= T, > MSG BYTEA, PRIMARY KEY ( ID ) ) Message: ERROR: relation "activemq_msgs" > already exists SQLState: 42P07 Vendor code: 0 > 08 Feb 2012 11:22:13 - Failure details: ERROR: relation "activemq_msgs" > already exists > org.postgresql.util.PSQLException: ERROR: relation "activemq_msgs" alread= y > exists > 08 Feb 2012 11:22:13 - Failure details: ERROR: current transaction is > aborted, commands ignored until end of transaction block > org.postgresql.util.PSQLException: ERROR: current transaction is aborted, > commands ignored until end of transaction block > =A0 =A0 =A0 =A0at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecut= orImpl.java:2102) > =A0 =A0 =A0 =A0at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl= .java:1835) > =A0 =A0 =A0 =A0at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:2= 57) > =A0 =A0 =A0 =A0at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statemen= t.java:500) > =A0 =A0 =A0 =A0at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc= 2Statement.java:374) > =A0 =A0 =A0 =A0at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statemen= t.java:366) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met= hod) > =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Sou= rce) > =A0 =A0 =A0 =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown= Source) > =A0 =A0 =A0 =A0at java.lang.reflect.Method.invoke(Unknown Source) > =A0 =A0 =A0 =A0at > org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.= invoke(AbstractJdbc23PooledConnection.java:455) > . > . > . > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Supre= ssing-PostgreSQL-exceptions-for-creating-tables-when-tables-already-exist-t= p4370212p4370212.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. --=20 http://fusesource.com http://blog.garytully.com