activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Pesochinskiy (JIRA)" <>
Subject [jira] Commented: (AMQ-876) Kaha DB cannot locate queue data files
Date Tue, 12 Sep 2006 00:48:23 GMT
    [ ] 
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

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?  



> Kaha DB cannot locate queue data files
> --------------------------------------
>                 Key: AMQ-876
>                 URL:
>             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: Could not locate data file queue-data-1
>         at org.apache.activemq.util.JMSExceptionSupport.create(
>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(
>         at org.apache.activemq.TransactionContext.commit(
>         at org.apache.activemq.ActiveMQSession.commit(
>         at
>         at$OneMessageAtATime.runMultiQueue(
>         at$OneMessageAtATime.doRun(
>         at$
>         at Source)
> Caused by: org.apache.activemq.kaha.RuntimeStoreException: Could
not locate data file queue-data-1
>         at org.apache.activemq.kaha.impl.MapContainerImpl.getValue(
>         at org.apache.activemq.kaha.impl.MapContainerImpl.remove(
>         at
>         at
>         at
>         at org.apache.activemq.transaction.LocalTransaction.commit(
>         at
>         at
>         at
>         at
>         at
>         at org.apache.activemq.command.TransactionInfo.visit(
>         at
>         at$1.onCommand(
>         at org.apache.activemq.transport.ResponseCorrelator.onCommand(
>         at org.apache.activemq.transport.TransportFilter.onCommand(
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(
>         at org.apache.activemq.transport.InactivityMonitor.onCommand(
>         at org.apache.activemq.transport.TransportSupport.doConsume(
>         at
>         ... 1 more
> Caused by: Could not locate data file queue-data-1
>         at org.apache.activemq.kaha.impl.DataManager.getDataFile(
>         at org.apache.activemq.kaha.impl.StoreDataReader.readItem(
>         at org.apache.activemq.kaha.impl.DataManager.readItem(
>         at org.apache.activemq.kaha.impl.MapContainerImpl.getValue(
>         ... 20 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message