You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Vadim Pesochinskiy (JIRA)" <ji...@apache.org> on 2006/09/12 02:48:23 UTC

[jira] Commented: (AMQ-876) Kaha DB cannot locate queue data files

    [ https://issues.apache.org/activemq/browse/AMQ-876?page=comments#action_36938 ] 
            
Vadim Pesochinskiy commented on AMQ-876:
----------------------------------------


Hi Rob,

I have been trying to understand what is going on there. Here is what I found out so far. The exception happens in DataManager.getDataFile(DataItem) method. In this method the 2nd line is fileMap.get(key); and the key is -1 when the exception occurs. 

The key is from getFile() method of the DataItem. If you scroll down the stack trace to MapContainerImpl.getValue(), the DataItem's file field is set from IndexItem's valueFile member. This value is set "incorrectly" to -1 in MapContainerImpl.remove. 

In this method you find the following lines:

// ensure we have the upto date item
item=indexList.getEntry(item);

The IndexItem item is set from a HashMap in this method and the valueFile field on this object is "correct" (i.e. != -1). However after this line, the value that is read from the file system has the -1 in it, which results in error.

Quite frankly, I do not yet understand the Kaha code well enough. Can you please guide me to through this, so I can help you with resolving and testing this issue? By the way can you reproduce this JIRA?  

Regards,

Vadim


> Kaha DB cannot locate queue data files
> --------------------------------------
>
>                 Key: AMQ-876
>                 URL: https://issues.apache.org/activemq/browse/AMQ-876
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 4.1
>         Environment: WinXP
>            Reporter: Vadim Pesochinskiy
>         Assigned To: Rob Davies
>             Fix For: 4.1
>
>
> Keep getting exception below.  Note that you are looking for queue-data-1, but actual file name is data-queue-data-1
> $ pwd
>   /cygdrive/d/amq/activemq-kaha/kaha.db
> $ ls
> data-kaha-1  data-queue-data-1  index-kaha  index-queue-data  index-transactions
> javax.jms.JMSException: java.io.IOException: Could not locate data file queue-data-1
>         at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1154)
>         at org.apache.activemq.TransactionContext.commit(TransactionContext.java:260)
>         at org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:464)
>         at com.barra.cp.common.io.MultiQueueReceiver.onMessage(MultiQueueReceiver.java:163)
>         at com.barra.cp.common.io.SingleMessageMultiQueueReceiver$OneMessageAtATime.runMultiQueue(SingleMessageMultiQueueReceiver.java:176)
>         at com.barra.cp.common.io.SingleMessageMultiQueueReceiver$OneMessageAtATime.doRun(SingleMessageMultiQueueReceiver.java:143)
>         at com.barra.cp.common.io.SingleMessageMultiQueueReceiver$OneMessageAtATime.run(SingleMessageMultiQueueReceiver.java:124)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: org.apache.activemq.kaha.RuntimeStoreException: java.io.IOException: Could not locate data file queue-data-1
>         at org.apache.activemq.kaha.impl.MapContainerImpl.getValue(MapContainerImpl.java:340)
>         at org.apache.activemq.kaha.impl.MapContainerImpl.remove(MapContainerImpl.java:265)
>         at org.apache.activemq.store.kahadaptor.KahaMessageStore.removeMessage(KahaMessageStore.java:68)
>         at org.apache.activemq.store.kahadaptor.KahaTransaction.commit(KahaTransaction.java:92)
>         at org.apache.activemq.store.kahadaptor.KahaTransactionStore.commit(KahaTransactionStore.java:95)
>         at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:68)
>         at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:154)
>         at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:92)
>         at org.apache.activemq.broker.BrokerFilter.commitTransaction(BrokerFilter.java:92)
>         at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:102)
>         at org.apache.activemq.broker.AbstractConnection.processCommitTransactionOnePhase(AbstractConnection.java:330)
>         at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:99)
>         at org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:228)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:63)
>         at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:92)
>         at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:123)
>         at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:123)
>         at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:88)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:127)
>         ... 1 more
> Caused by: java.io.IOException: Could not locate data file queue-data-1
>         at org.apache.activemq.kaha.impl.DataManager.getDataFile(DataManager.java:117)
>         at org.apache.activemq.kaha.impl.StoreDataReader.readItem(StoreDataReader.java:62)
>         at org.apache.activemq.kaha.impl.DataManager.readItem(DataManager.java:121)
>         at org.apache.activemq.kaha.impl.MapContainerImpl.getValue(MapContainerImpl.java:337)
>         ... 20 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira