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 <[email protected]> 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 get a > lot of long exception messages asserting that my JDBC tables could not be > created because they could already exist. Is there any way to suppress > these exception details from showing up in the logging? This issue already > appears to have been previously identified > (https://issues.apache.org/jira/browse/AMQ-3189), but I have yet to discover > if anyone has come up with a solution or workaround. Below 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, CONTAINER > VARCHAR(250), MSGID_PROD VARCHAR(250), MSGID_SEQ BIGINT, EXPIRATION BIGINT, > 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" already > 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 > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:455) > . > . > . > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Supressing-PostgreSQL-exceptions-for-creating-tables-when-tables-already-exist-tp4370212p4370212.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com
