activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Olbrechts (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AMQ-3860) doAddMessageReference missing setting priority into prepared statement therefore using wrong index for message itself
Date Tue, 14 Aug 2012 07:28:38 GMT

    [ 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

        

Mime
View raw message