[ 
https://issues.apache.org/jira/browse/AMQ-6826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish closed AMQ-6826.
-----------------------------
    Resolution: Not A Problem

Configurable as indicated in comments, no fix needed

> PostgresqlJDBCAdapter with table prefix errors when executing 
> createSchemaStatements for creating Indexes.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-6826
>                 URL: https://issues.apache.org/jira/browse/AMQ-6826
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>         Environment: ALL
>            Reporter: chandra shekhar pandey
>            Priority: Minor
>
> - When using PostgresqlJDBCAdapter to auto create the tables and a table 
> prefix statement is also used the create schema statements fail because 
> PostgresqlJDBCAdapter doesn't add   the table prefix to Index:
> {code}
> activemq.xml snippet:
>         <bean id="postgresPersistenceAdapter" 
> class="org.apache.activemq.store.jdbc.adapter.PostgresqlJDBCAdapter" />
>       
>               <persistenceAdapter>
>             <jdbcPersistenceAdapter createTablesOnStartup="true" 
> adapter="#postgresPersistenceAdapter" dataSource="#postgres-ds" 
> lockKeepAlivePeriod="5000" >
>                 <statements>
>                     <statements tablePrefix="LOCAL_" />
>                 </statements>
>                 <locker>
>                     <lease-database-locker lockAcquireSleepInterval="10000" />
>                 </locker>
>             </jdbcPersistenceAdapter>
>         </persistenceAdapter>
> {code}
> - amq log error
> {code}
> 2017-09-28 10:06:40,199 | WARN  | AMQ-1-thread-1   | DefaultJDBCAdapter       
>         | .jdbc.adapter.DefaultJDBCAdapter  117 | 137 - 
> org.apache.activemq.activemq-osgi - 5.11.0.redhat-621169 | Could not create 
> JDBC tables; they could already exist. Failure was: ALTER TABLE 
> LOCAL_ACTIVEMQ_ACKS DROP CONSTRAINT "activemq_acks_pkey" Message: ERROR: 
> constraint "activemq_acks_pkey" of relation "local_activemq_acks" does not 
> exist SQLState: 42704 Vendor code: 0
> 2017-09-28 10:06:40,200 | WARN  | AMQ-1-thread-1   | JDBCPersistenceAdapter   
>         | tore.jdbc.JDBCPersistenceAdapter  601 | 137 - 
> org.apache.activemq.activemq-osgi - 5.11.0.redhat-621169 | Failure details: 
> ERROR: constraint "activemq_acks_pkey" of relation "local_activemq_acks" does 
> not exist
> org.postgresql.util.PSQLException: ERROR: constraint "activemq_acks_pkey" of 
> relation "local_activemq_acks" does not exist
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477)[172:org.postgresql.jdbc42:42.1.4]
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190)[172:org.postgresql.jdbc42:42.1.4]
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)[172:org.postgresql.jdbc42:42.1.4]
>         at 
> org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)[172:org.postgresql.jdbc42:42.1.4]
>         at 
> org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)[172:org.postgresql.jdbc42:42.1.4]
>         at 
> org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301)[172:org.postgresql.jdbc42:42.1.4]
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to