You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Mikhail Melamud (JIRA)" <ji...@apache.org> on 2012/05/25 17:59:22 UTC
[jira] [Created] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Mikhail Melamud created AMQ-3860:
------------------------------------
Summary: doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
Key: AMQ-3860
URL: https://issues.apache.org/jira/browse/AMQ-3860
Project: ActiveMQ
Issue Type: Bug
Components: Message Store
Affects Versions: 5.6.0, 5.5.0, 5.4.2
Reporter: Mikhail Melamud
Not sure in what cases ActiveMQDestination() is actually called, but
getAddMessageStatement() returns statement with 7 params to set...
public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
long expirationTime, String messageRef) throws SQLException, IOException {
PreparedStatement s = c.getAddMessageStatement();
cleanupExclusiveLock.readLock().lock();
try {
if (s == null) {
s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
if (this.batchStatments) {
c.setAddMessageStatement(s);
}
}
s.setLong(1, messageID.getBrokerSequenceId());
s.setString(2, messageID.getProducerId().toString());
s.setLong(3, messageID.getProducerSequenceId());
s.setString(4, destination.getQualifiedName());
s.setLong(5, expirationTime);
s.setString(6, messageRef);
if (this.batchStatments) {
s.addBatch();
} else if (s.executeUpdate() != 1) {
throw new SQLException("Failed add a message");
}
} finally {
cleanupExclusiveLock.readLock().unlock();
if (!this.batchStatments) {
s.close();
}
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated AMQ-3860:
-----------------------------
Fix Version/s: 5.7.0
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
> Fix For: 5.7.0
>
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Posted by "Benoit Olbrechts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433957#comment-13433957 ]
Benoit Olbrechts commented on AMQ-3860:
---------------------------------------
I encounter the same issue with informix:
{code}
2012-08-14/09:10:00.440/CEST [WARN ] <org.apache.activemq.store.jdbc.JDBCPersistenceAdapter> - JDBC Failure: IN parameter has not been set. index = 7
java.sql.SQLException: IN parameter has not been set. index = 7
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:488)
at com.informix.jdbc.IfxSqli.d(IfxSqli.java:1599)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:1051)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:918)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:303)
at com.informix.jdbc.IfxStatement.c(IfxStatement.java:1276)
at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java:421)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.activemq.store.jdbc.adapter.BlobJDBCAdapter.doAddMessage(BlobJDBCAdapter.java:71)
at org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:123)
at org.apache.activemq.store.memory.MemoryTransactionStore$3.run(MemoryTransactionStore.java:302)
at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:98)
at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:248)
at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:72)
at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:252)
at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103)
at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:415)
at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2012-08-14/09:10:00.445/CEST [WARN ] <org.apache.activemq.transaction.LocalTransaction> - Store COMMIT FAILED:
{code}
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (AMQ-3860) doAddMessageReference missing
setting priority into prepared statement therefore using wrong index for
message itself
Posted by "Benoit Olbrechts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433957#comment-13433957 ]
Benoit Olbrechts edited comment on AMQ-3860 at 8/14/12 6:27 PM:
----------------------------------------------------------------
I encounter the same issue with informix with activemq-5.6.0 :
{code}
2012-08-14/09:10:00.440/CEST [WARN ] <org.apache.activemq.store.jdbc.JDBCPersistenceAdapter> - JDBC Failure: IN parameter has not been set. index = 7
java.sql.SQLException: IN parameter has not been set. index = 7
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:488)
at com.informix.jdbc.IfxSqli.d(IfxSqli.java:1599)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:1051)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:918)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:303)
at com.informix.jdbc.IfxStatement.c(IfxStatement.java:1276)
at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java:421)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.activemq.store.jdbc.adapter.BlobJDBCAdapter.doAddMessage(BlobJDBCAdapter.java:71)
at org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:123)
at org.apache.activemq.store.memory.MemoryTransactionStore$3.run(MemoryTransactionStore.java:302)
at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:98)
at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:248)
at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:72)
at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:252)
at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103)
at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:415)
at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2012-08-14/09:10:00.445/CEST [WARN ] <org.apache.activemq.transaction.LocalTransaction> - Store COMMIT FAILED:
{code}
was (Author: bugz):
I encounter the same issue with informix:
{code}
2012-08-14/09:10:00.440/CEST [WARN ] <org.apache.activemq.store.jdbc.JDBCPersistenceAdapter> - JDBC Failure: IN parameter has not been set. index = 7
java.sql.SQLException: IN parameter has not been set. index = 7
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:488)
at com.informix.jdbc.IfxSqli.d(IfxSqli.java:1599)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:1051)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:918)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:303)
at com.informix.jdbc.IfxStatement.c(IfxStatement.java:1276)
at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java:421)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.activemq.store.jdbc.adapter.BlobJDBCAdapter.doAddMessage(BlobJDBCAdapter.java:71)
at org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:123)
at org.apache.activemq.store.memory.MemoryTransactionStore$3.run(MemoryTransactionStore.java:302)
at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:98)
at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:248)
at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:72)
at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:252)
at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103)
at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:415)
at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2012-08-14/09:10:00.445/CEST [WARN ] <org.apache.activemq.transaction.LocalTransaction> - Store COMMIT FAILED:
{code}
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved AMQ-3860.
------------------------------
Resolution: Not A Problem
Assignee: Claus Ibsen
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
> Assignee: Claus Ibsen
> Fix For: 5.7.0
>
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Posted by "Benoit Olbrechts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435785#comment-13435785 ]
Benoit Olbrechts commented on AMQ-3860:
---------------------------------------
For those having the same issue:
You can use the DefaultJDBCAdapter by defining its data types for strings/long/sequences/binary/..:
{code}
<persistenceAdapter>
<jdbcPersistenceAdapter dataDirectory="${activemq.base}/data"
dataSource="#informix-ds" createTablesOnStartup="false" >
<amq:adapter>
<amq:defaultJDBCAdapter>
<amq:statements>
<amq:statements
containerNameDataType="VARCHAR(150)"
stringIdDataType="VARCHAR(150)"
longDataType="INT8"
sequenceDataType="INT8"
binaryDataType="BYTE" />
</amq:statements>
</amq:defaultJDBCAdapter>
</amq:adapter>
</jdbcPersistenceAdapter>
</persistenceAdapter>
{code}
Good luck!
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3860) doAddMessageReference missing setting
priority into prepared statement therefore using wrong index for message
itself
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457846#comment-13457846 ]
Claus Ibsen commented on AMQ-3860:
----------------------------------
There is a org.apache.activemq.store.jdbc.adapter.InformixJDBCAdapter which should be in the xml as a "informixJDBCAdapter" type you can use, or do as Benoit shows above to set the data types that suits Informix.
> doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3860
> URL: https://issues.apache.org/jira/browse/AMQ-3860
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.4.2, 5.5.0, 5.6.0
> Reporter: Mikhail Melamud
> Fix For: 5.7.0
>
>
> Not sure in what cases ActiveMQDestination() is actually called, but
> getAddMessageStatement() returns statement with 7 params to set...
>
> public void doAddMessageReference(TransactionContext c, long sequence, MessageId messageID, ActiveMQDestination destination,
> long expirationTime, String messageRef) throws SQLException, IOException {
> PreparedStatement s = c.getAddMessageStatement();
> cleanupExclusiveLock.readLock().lock();
> try {
> if (s == null) {
> s = c.getConnection().prepareStatement(this.statements.getAddMessageStatement());
> if (this.batchStatments) {
> c.setAddMessageStatement(s);
> }
> }
> s.setLong(1, messageID.getBrokerSequenceId());
> s.setString(2, messageID.getProducerId().toString());
> s.setLong(3, messageID.getProducerSequenceId());
> s.setString(4, destination.getQualifiedName());
> s.setLong(5, expirationTime);
> s.setString(6, messageRef);
> if (this.batchStatments) {
> s.addBatch();
> } else if (s.executeUpdate() != 1) {
> throw new SQLException("Failed add a message");
> }
> } finally {
> cleanupExclusiveLock.readLock().unlock();
> if (!this.batchStatments) {
> s.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira