Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-642

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • JBoss A-MQ 6.1
    • broker
    • None
    • Workaround Exists
    • Hide

      Add the createTablesOnStartup to false, but this is not an acceptable workaround b/c when it started with an empty table, the user will need to set this to true or just leave it out. Then once the table is created, you will need to add this line back. That's not documented and very inconvenient.

      <jdbcPersistenceAdapter dataDirectory="${karaf.base}/data" dataSource="#pgsql-ds" createTablesOnStartup="false"/>

      Show
      Add the createTablesOnStartup to false, but this is not an acceptable workaround b/c when it started with an empty table, the user will need to set this to true or just leave it out. Then once the table is created, you will need to add this line back. That's not documented and very inconvenient. <jdbcPersistenceAdapter dataDirectory="${karaf.base}/data" dataSource="#pgsql-ds" createTablesOnStartup="false"/>
    • Hide

      copy the postgresql-jdbc.jar under deploy/

      Show
      copy the postgresql-jdbc.jar under deploy/

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-whui Roger Hui
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: