[
https://issues.apache.org/jira/browse/AMQ-3627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165202#comment-13165202
]
Jörg Waßmer commented on AMQ-3627:
----------------------------------
Happens in line "inflightTransactions.values().iterator().next().get(0)".
{noformat}
public Location getFirstInProgressTxLocation() {
Location l = null;
synchronized (inflightTransactions) {
if (!inflightTransactions.isEmpty()) {
l =
inflightTransactions.values().iterator().next().get(0).getLocation();
}
if (!preparedTransactions.isEmpty()) {
Location t =
preparedTransactions.values().iterator().next().get(0).getLocation();
if (l==null || t.compareTo(l) <= 0) {
l = t;
}
}
}
return l;
}
{noformat}
> IndexOutOfBoundsException in
> org.apache.activemq.store.kahadb.MessageDatabase.getFirstInProgressTxLocation()
> ------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3627
> URL: https://issues.apache.org/jira/browse/AMQ-3627
> Project: ActiveMQ
> Issue Type: Bug
> Components: Message Store
> Affects Versions: 5.5.1
> Environment: ActiveMQ 5.5.1
> Reporter: Jörg Waßmer
> Priority: Critical
>
> Following error is happening once a day. The messages in the affected queue
> are hanging until restart.
> {noformat}
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.rangeCheck(ArrayList.java:604)
> at java.util.ArrayList.get(ArrayList.java:382)
> at java.util.Collections$SynchronizedList.get(Collections.java:1873)
> at
> org.apache.activemq.store.kahadb.MessageDatabase.getFirstInProgressTxLocation(MessageDatabase.java:430)
> at
> org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1168)
> at
> org.apache.activemq.store.kahadb.MessageDatabase$10.execute(MessageDatabase.java:730)
> at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
> at
> org.apache.activemq.store.kahadb.MessageDatabase.checkpointCleanup(MessageDatabase.java:728)
> at
> org.apache.activemq.store.kahadb.MessageDatabase$3.run(MessageDatabase.java:303)
> KahaDB: Recovering checkpoint thread after death
> {noformat}
--
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