-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
JBoss A-MQ 6.1
-
None
-
Workaround Exists
-
-
When using postgresql as a persistence store, once the tables are already created, it will complain that the table is already create and after a bunch of error, it will go back to the "default implementation" and start the broker.Here is my setup.
<persistenceAdapter>
<jdbcPersistenceAdapter dataDirectory="${karaf.base} /data" dataSource="#pgsql-ds" />
</persistenceAdapter>
<bean id="pgsql-ds" class="org.postgresql.ds.PGPoolingDataSource">
<property name="serverName" value="localhost"/>
<property name="databaseName" value="jb248"/>
<property name="portNumber" value="5432"/>
<property name="user" value="xxx"/>
<property name="password" value="yyy"/>
<property name="initialConnections" value="1"/>
<property name="maxConnections" value="10"/>
</bean>Here is the error log : "table_already_created.log"2014-04-25 14:53:29,362 | WARN | pool-15-thread-1 | DefaultJDBCAdapter | .jdbc.adapter.DefaultJDBCAdapter 114 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Could not create JDBC tables; they could already exist. Failure was: CREATE INDEX ACTIVEMQ_MSGS_CIDX ON ACTIVEMQ_MSGS (CONTAINER) Message: ERROR: current transaction is aborted, commands ignored until end of transaction block SQLState: 25P02 Vendor code: 0eventually it will give up and start the broker2014-04-25 14:53:29,413 | INFO | pool-15-thread-1 | JDBCPersistenceAdapter | tore.jdbc.JDBCPersistenceAdapter 458 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Database lock driver override not found for :[postgresql_native_driver]. Will use default implementation.2014-04-25 14:58:08,289 | INFO | pool-17-thread-1 | ActiveMQServiceFactory | q.fabric.ActiveMQServiceFactory$ 64 | 135 - org.jboss.amq.mq-fabric - 6.1.0.redhat-379 | Broker amq has started.