Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6983

DB schema not being created in postgresql

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 5.15.2
    • None
    • JDBC
    • DB: Postgresql v9.6.9

      OS: CentOS 7

    • Important

    Description

      I am trying to setup activemq as master/slave with postgresql. After setting up the configs as suggested in the docs, I keep seeing the following in activemq.log

       

      2018-06-08 20:16:42,698 | WARN  | slaveBroker lease acquire failure: org.postgresql.util.PSQLException: ERROR: relation "activemq_lock" does not exist
        Position: 8 | org.apache.activemq.store.jdbc.LeaseDatabaseLocker | main
      org.postgresql.util.PSQLException: ERROR: relation "activemq_lock" does not exist
        Position: 8
      

      I checked the activemq database and there were no tables, seems like they are not being created.

      This is my config:

      <broker xmlns="http://activemq.apache.org/schema/core" brokerName="slaveBroker">
      
      ................
      
          <persistenceAdapter>
              <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#postgres-ds" lockKeepAlivePeriod="5000">
                  <locker>
                      <lease-database-locker lockAcquireSleepInterval="10000"/>
                  </locker>
              </jdbcPersistenceAdapter>
          </persistenceAdapter>
      
      ................
      
      </broker>
      
      ..................
      
              <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
              <property name="url" value="jdbc:postgresql://127.0.0.1:5432/activemq"/>
                      <property name="user" value="activemq"/>
                      <property name="password" value="PASSWORDS"/>
                      <property name="initialConnections" value="10"/>
                      <property name="maxConnections" value="50"/>
              </bean>
      
      

      Should the tables be created automatically?

      Attachments

        Activity

          People

            Unassigned Unassigned
            altinukshini Altin Ukshini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: