activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-6826) PostgresqlJDBCAdapter with table prefix errors when executing createSchemaStatements for creating Indexes.
Date Thu, 05 Oct 2017 17:39:01 GMT

    [ https://issues.apache.org/jira/browse/AMQ-6826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16193287#comment-16193287
] 

ASF GitHub Bot commented on AMQ-6826:
-------------------------------------

Github user 1984shekhar closed the pull request at:

    https://github.com/apache/activemq/pull/260


> 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)

Mime
View raw message