You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by qbeukes <qb...@add.za.net> on 2008/07/17 09:05:23 UTC

Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Hey, 

Our queues usually grow much faster than the database can accept data from
the consumer, so they tend to be very large. I'm not sure if this has
anything to do with it. 

But the service stopped responding (queue just kept growing, and consumer
wasn't reading any data). 

So I killed ActiveMQ. Now when I start it I am getting: 
WARN  AMQMessageStore                - Could not replay add for message
'ID:video.junkmail.co.za-57456-1211989603249-0:3521147:1:1:1'.  Message may
have already been added. reason: java.lang.IndexOutOfBoundsException: Index:
2, Size: 2 
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 
        at java.util.ArrayList.RangeCheck(ArrayList.java:547) 
        at java.util.ArrayList.get(ArrayList.java:322) 
        at
org.apache.activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209) 
        at
org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149) 
        at
org.apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java:241) 
        at
org.apache.activemq.kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304) 
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118) 
        at
org.apache.activemq.store.amq.AMQMessageStore.replayAddMessage(AMQMessageStore.java:173) 
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.recover(AMQPersistenceAdapter.java:495) 
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:212) 
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1448) 
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1400) 
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:513) 
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:422) 
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:46) 
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201) 
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171) 
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425) 
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) 
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156) 
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) 
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) 
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287) 
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) 
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64) 
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52) 
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:91) 
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51) 
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71) 
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54) 
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:112) 
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74) 
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51) 
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:104) 
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51) 
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:76) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:597) 
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222) 
        at org.apache.activemq.console.Main.main(Main.java:106) 

This happens while trying to restore the store. After that new messages
give: 
WARN  AMQMessageStore                - Message could not be added to long
term store: Index: 2, Size: 2 
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 
        at java.util.ArrayList.RangeCheck(ArrayList.java:547) 
        at java.util.ArrayList.get(ArrayList.java:322) 
        at
org.apache.activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209) 
        at
org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149) 
        at
org.apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java:241) 
        at
org.apache.activemq.kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304) 
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118) 
        at
org.apache.activemq.store.amq.AMQMessageStore$4.execute(AMQMessageStore.java:341) 
        at
org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:44) 
        at
org.apache.activemq.store.amq.AMQMessageStore.doAsyncWrite(AMQMessageStore.java:330) 
        at
org.apache.activemq.store.amq.AMQMessageStore.asyncWrite(AMQMessageStore.java:300) 
        at
org.apache.activemq.store.amq.AMQMessageStore$1.iterate(AMQMessageStore.java:92) 
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98) 
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36) 

Can someone please advice.
-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18502722.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
OK.

So Kaha is obviously garbage and not reliable. Will I get more reliability
with a DataSource store, say... the following:

    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data" dataSource="#postgres-ds"/>
    </persistenceAdapter>

  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
    <property name="serverName" value="localhost"/>
    <property name="databaseName" value="activemq"/>
    <property name="portNumber" value="0"/>
    <property name="user" value="postgres"/>
    <property name="password" value=""/>
    <property name="dataSourceName" value="postgres"/>
    <property name="initialConnections" value="5"/>
    <property name="maxConnections" value="10"/>
  </bean>

I tried this, and it is persisting. I just want a reliable way to avoid
loosing 2 weeks worth of stats a second time.

Q


qbeukes wrote:
> 
> I'm not sure where it fails.
> 
> It failed when starting with the errors I gave previously. So I removed:
> /opt/apache-activemq-5.1.0/amqdata/kr-store/state/index-store-state
> 
> And now it fails with another error. Here is the log for when starting up:
> ACTIVEMQ_HOME: /opt/apache-activemq-5.1.0
> ACTIVEMQ_BASE: /opt/apache-activemq-5.1.0
> Loading message broker from: xbean:activemq.xml
> INFO  BrokerService                  - Using Persistence Adapter:
> AMQPersistenceAdapter(/opt/apache-activemq-5.1.0/amqdata)
> INFO  BrokerService                  - ActiveMQ 5.1.0 JMS Message Broker
> (localhost) is starting
> INFO  BrokerService                  - For help or more information please
> see: http://activemq.apache.org/
> INFO  AMQPersistenceAdapter          - AMQStore starting using directory:
> /opt/apache-activemq-5.1.0/amqdata
> INFO  ManagementContext              - JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> INFO  KahaStore                      - Kaha Store using data directory
> /opt/apache-activemq-5.1.0/amqdata/kr-store/state
> ERROR BrokerService                  - Failed to start ActiveMQ JMS
> Message Broker. Reason: java.io.EOFException
> java.io.EOFException
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
>         at
> org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
>         at
> org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
>         at
> org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
>         at
> org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
>         at
> org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
>         at
> org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
>         at
> org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
>         at
> org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
>         at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
>         at
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
>         at
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
>         at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>         at org.apache.activemq.console.Main.main(Main.java:106)
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method
> failed; nested exception is java.io.EOFException
> java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method
> failed; nested exception is java.io.EOFException
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>         at org.apache.activemq.console.Main.main(Main.java:106)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of
> init method failed; nested exception is java.io.EOFException
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
>         ... 10 more
> Caused by: java.io.EOFException
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
>         at
> org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
>         at
> org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
>         at
> org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
>         at
> org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
>         at
> org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
>         at
> org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
>         at
> org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
>         at
> org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
>         at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
>         at
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
>         at
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
>         at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
>         ... 29 more
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method
> failed; nested exception is java.io.EOFException
> java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method
> failed; nested exception is java.io.EOFException
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>         at org.apache.activemq.console.Main.main(Main.java:106)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of
> init method failed; nested exception is java.io.EOFException
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
>         ... 10 more
> Caused by: java.io.EOFException
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
>         at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
>         at
> org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
>         at
> org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
>         at
> org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
>         at
> org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
>         at
> org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
>         at
> org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
>         at
> org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
>         at
> org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
>         at
> org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
>         at
> org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
>         at
> org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
>         at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
>         at
> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
>         ... 29 more
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18564069.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
I'm not sure where it fails.

It failed when starting with the errors I gave previously. So I removed:
/opt/apache-activemq-5.1.0/amqdata/kr-store/state/index-store-state

And now it fails with another error. Here is the log for when starting up:
ACTIVEMQ_HOME: /opt/apache-activemq-5.1.0
ACTIVEMQ_BASE: /opt/apache-activemq-5.1.0
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - Using Persistence Adapter:
AMQPersistenceAdapter(/opt/apache-activemq-5.1.0/amqdata)
INFO  BrokerService                  - ActiveMQ 5.1.0 JMS Message Broker
(localhost) is starting
INFO  BrokerService                  - For help or more information please
see: http://activemq.apache.org/
INFO  AMQPersistenceAdapter          - AMQStore starting using directory:
/opt/apache-activemq-5.1.0/amqdata
INFO  ManagementContext              - JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO  KahaStore                      - Kaha Store using data directory
/opt/apache-activemq-5.1.0/amqdata/kr-store/state
ERROR BrokerService                  - Failed to start ActiveMQ JMS Message
Broker. Reason: java.io.EOFException
java.io.EOFException
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
        at
org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
        at
org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
        at
org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
        at
org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
        at
org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
        at
org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in file
[/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method failed;
nested exception is java.io.EOFException
java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in file
[/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method failed;
nested exception is java.io.EOFException
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of
init method failed; nested exception is java.io.EOFException
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
        ... 10 more
Caused by: java.io.EOFException
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
        at
org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
        at
org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
        at
org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
        at
org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
        at
org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
        at
org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
        ... 29 more
ERROR: java.lang.Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in file
[/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method failed;
nested exception is java.io.EOFException
java.lang.Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in file
[/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of init method failed;
nested exception is java.io.EOFException
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:129)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in file [/opt/apache-activemq-5.1.0/activemq.xml]: Invocation of
init method failed; nested exception is java.io.EOFException
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
        at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
        at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
        at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:111)
        at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)
        ... 10 more
Caused by: java.io.EOFException
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:383)
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:361)
        at
org.apache.activemq.kaha.impl.index.StoreIndexReader.readItem(StoreIndexReader.java:46)
        at
org.apache.activemq.kaha.impl.index.IndexManager.getIndex(IndexManager.java:67)
        at
org.apache.activemq.kaha.impl.IndexRootContainer.getRoot(IndexRootContainer.java:126)
        at
org.apache.activemq.kaha.impl.KahaStore.generateInterestInMapDataFiles(KahaStore.java:576)
        at
org.apache.activemq.kaha.impl.KahaStore.initialize(KahaStore.java:498)
        at
org.apache.activemq.kaha.impl.KahaStore.getMapContainerIds(KahaStore.java:256)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAdapter.java:94)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:224)
        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1577)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1530)
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:540)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:444)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
        ... 29 more

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18525630.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by Rob Davies <ra...@gmail.com>.
ok - you're using amqstore - so does it fail building the indexes ?

On 17 Jul 2008, at 12:35, qbeukes wrote:

>
> Firstly: Do you mean I should try to rebuild the indexes, or that it  
> fails
> when rebuilding the indexes?
>
> Secondly I'm not sure which one I'm using. Here is my persistence
> configuration:
>
>    <persistenceAdapter>
>          <amqPersistenceAdapter directory="${activemq.base}/amqdata"
> archiveDataLogs="true" maxFileLength="32mb"/>
>    </persistenceAdapter>
>
> Quintin
>
>
> rajdavies wrote:
>>
>> so you its fails in the same place - rebuilding the indexes ? - you
>> using raw Kaha or the default - amqstore ?
>> On 17 Jul 2008, at 10:09, qbeukes wrote:
>>
>>>
>>> OK. Fuse didn't help.
>>>
>>>
>>> qbeukes wrote:
>>>>
>>>> Never mind this. I figured it out. You meant if I DONT want to  
>>>> use a
>>>> snapshot I should use the stabilized FUSE packages. The question is
>>>> whether or not this bug is fixed in them?
>>>>
>>>>
>>>> qbeukes wrote:
>>>>>
>>>>> I'm not sure what you meant with:
>>>>>
>>>>> rajdavies wrote:
>>>>>>
>>>>>> or if you do want to use a snapshot - use a FUSE release - here:
>>>>>> http://open.iona.com/downloads/
>>>>>>
>>>>>
>>>>> Could you elaborate please?
>>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18504464.html
>>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18506492.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
Firstly: Do you mean I should try to rebuild the indexes, or that it fails
when rebuilding the indexes?

Secondly I'm not sure which one I'm using. Here is my persistence
configuration:

    <persistenceAdapter>
          <amqPersistenceAdapter directory="${activemq.base}/amqdata"
archiveDataLogs="true" maxFileLength="32mb"/>
    </persistenceAdapter>

Quintin


rajdavies wrote:
> 
> so you its fails in the same place - rebuilding the indexes ? - you  
> using raw Kaha or the default - amqstore ?
> On 17 Jul 2008, at 10:09, qbeukes wrote:
> 
>>
>> OK. Fuse didn't help.
>>
>>
>> qbeukes wrote:
>>>
>>> Never mind this. I figured it out. You meant if I DONT want to use a
>>> snapshot I should use the stabilized FUSE packages. The question is
>>> whether or not this bug is fixed in them?
>>>
>>>
>>> qbeukes wrote:
>>>>
>>>> I'm not sure what you meant with:
>>>>
>>>> rajdavies wrote:
>>>>>
>>>>> or if you do want to use a snapshot - use a FUSE release - here:
>>>>> http://open.iona.com/downloads/
>>>>>
>>>>
>>>> Could you elaborate please?
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18504464.html
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18506492.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by Rob Davies <ra...@gmail.com>.
so you its fails in the same place - rebuilding the indexes ? - you  
using raw Kaha or the default - amqstore ?
On 17 Jul 2008, at 10:09, qbeukes wrote:

>
> OK. Fuse didn't help.
>
>
> qbeukes wrote:
>>
>> Never mind this. I figured it out. You meant if I DONT want to use a
>> snapshot I should use the stabilized FUSE packages. The question is
>> whether or not this bug is fixed in them?
>>
>>
>> qbeukes wrote:
>>>
>>> I'm not sure what you meant with:
>>>
>>> rajdavies wrote:
>>>>
>>>> or if you do want to use a snapshot - use a FUSE release - here:
>>>> http://open.iona.com/downloads/
>>>>
>>>
>>> Could you elaborate please?
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18504464.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
OK. Fuse didn't help.


qbeukes wrote:
> 
> Never mind this. I figured it out. You meant if I DONT want to use a
> snapshot I should use the stabilized FUSE packages. The question is
> whether or not this bug is fixed in them?
> 
> 
> qbeukes wrote:
>> 
>> I'm not sure what you meant with:
>> 
>> rajdavies wrote:
>>> 
>>> or if you do want to use a snapshot - use a FUSE release - here:
>>> http://open.iona.com/downloads/
>>> 
>> 
>> Could you elaborate please?
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18504464.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by Rob Davies <ra...@gmail.com>.
yep - my bad :) - yes the bug is fixed in the FUSE release (if its the  
same bug that is)

On 17 Jul 2008, at 09:21, qbeukes wrote:

>
> Never mind this. I figured it out. You meant if I DONT want to use a  
> snapshot
> I should use the stabilized FUSE packages. The question is whether  
> or not
> this bug is fixed in them?
>
>
> qbeukes wrote:
>>
>> I'm not sure what you meant with:
>>
>> rajdavies wrote:
>>>
>>> or if you do want to use a snapshot - use a FUSE release - here:
>>> http://open.iona.com/downloads/
>>>
>>
>> Could you elaborate please?
>>
>
> -- 
> View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18503801.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
Never mind this. I figured it out. You meant if I DONT want to use a snapshot
I should use the stabilized FUSE packages. The question is whether or not
this bug is fixed in them?


qbeukes wrote:
> 
> I'm not sure what you meant with:
> 
> rajdavies wrote:
>> 
>> or if you do want to use a snapshot - use a FUSE release - here:
>> http://open.iona.com/downloads/
>> 
> 
> Could you elaborate please?
> 

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18503801.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
I'm not sure what you meant with:

rajdavies wrote:
> 
> or if you do want to use a snapshot - use a FUSE release - here:
> http://open.iona.com/downloads/
> 

Could you elaborate please?
-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18503721.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by Rob Davies <ra...@gmail.com>.
This looks a bug  fixed in trunk - either get 5.2-SNAPSHOT - here: http://people.apache.org/repo/m2-snapshot-repository/org/apache/activemq/apache-activemq/5.2-SNAPSHOT/
or if you do want to use a snapshot - use a FUSE release - here: http://open.iona.com/downloads/

cheers,

Rob

On 17 Jul 2008, at 08:26, qbeukes wrote:

>
> that would help wouldn't it. Appologies. I don't know why I missed  
> this part.
>
> I tried both of these with the same data directory (the newer one  
> downloaded
> after this happens)
> apache-activemq-5.0.0  apache-activemq-5.1.0
>
> Then, it runs on:
> video opt # ls -ld /etc/make.profile
> lrwxrwxrwx 1 root root 46 Jan 15  2008 /etc/make.profile ->
> /usr/portage/profiles/default-linux/x86/2006.1
> video opt # cat /proc/version
> Linux version 2.6.19-gentoo-r5 (root@livecd) (gcc version 4.1.1  
> (Gentoo
> 4.1.1-r3)) #2 SMP Thu Jan 17 08:31:04 SAST 2008
> video opt # cat /etc/gentoo-release
> Gentoo Base System release 1.12.9
>
> That's it.
> Q
>
>
> rajdavies wrote:
>>
>> which version ?
>> On 17 Jul 2008, at 08:05, qbeukes wrote:
>>
>>>
>>> Hey,
>>>
>>> Our queues usually grow much faster than the database can accept
>>> data from
>>> the consumer, so they tend to be very large. I'm not sure if this  
>>> has
>>> anything to do with it.
>>>
>>> But the service stopped responding (queue just kept growing, and
>>> consumer
>>> wasn't reading any data).
>>>
>>> So I killed ActiveMQ. Now when I start it I am getting:
>>> WARN  AMQMessageStore                - Could not replay add for
>>> message
>>> 'ID:video.junkmail.co.za-57456-1211989603249-0:3521147:1:1:1'.
>>> Message may
>>> have already been added. reason:
>>> java.lang.IndexOutOfBoundsException: Index:
>>> 2, Size: 2
>>> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>>>       at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>       at java.util.ArrayList.get(ArrayList.java:322)
>>>       at
>>> org
>>> .apache
>>> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java: 
>>> 209)
>>>       at
>>> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java: 
>>> 149)
>>>       at
>>> org
>>> .apache 
>>> .activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java:
>>> 241)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store
>>> .kahadaptor
>>> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store.amq.AMQMessageStore.replayAddMessage(AMQMessageStore.java: 
>>> 173)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store.amq.AMQPersistenceAdapter.recover(AMQPersistenceAdapter.java:
>>> 495)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java: 
>>> 212)
>>>       at
>>> org
>>> .apache
>>> .activemq 
>>> .broker.BrokerService.createRegionBroker(BrokerService.java:
>>> 1448)
>>>       at
>>> org
>>> .apache
>>> .activemq.broker.BrokerService.createBroker(BrokerService.java:1400)
>>>       at
>>> org
>>> .apache.activemq.broker.BrokerService.getBroker(BrokerService.java:
>>> 513)
>>>       at
>>> org.apache.activemq.broker.BrokerService.start(BrokerService.java: 
>>> 422)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .xbean 
>>> .XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:
>>> 46)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support
>>> .AbstractAutowireCapableBeanFactory
>>> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support
>>> .AbstractAutowireCapableBeanFactory
>>> .initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support
>>> .AbstractAutowireCapableBeanFactory
>>> .createBean(AbstractAutowireCapableBeanFactory.java:425)
>>>       at
>>> org.springframework.beans.factory.support.AbstractBeanFactory
>>> $1.getObject(AbstractBeanFactory.java:251)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support
>>> .DefaultSingletonBeanRegistry
>>> .getSingleton(DefaultSingletonBeanRegistry.java:156)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>>       at
>>> org
>>> .springframework
>>> .beans
>>> .factory
>>> .support
>>> .DefaultListableBeanFactory
>>> .preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>>>       at
>>> org
>>> .springframework
>>> .context
>>> .support
>>> .AbstractApplicationContext.refresh(AbstractApplicationContext.java:
>>> 352)
>>>       at
>>> org
>>> .apache
>>> .xbean
>>> .spring
>>> .context
>>> .ResourceXmlApplicationContext
>>> .<init>(ResourceXmlApplicationContext.java:64)
>>>       at
>>> org
>>> .apache
>>> .xbean
>>> .spring
>>> .context
>>> .ResourceXmlApplicationContext
>>> .<init>(ResourceXmlApplicationContext.java:52)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .xbean
>>> .XBeanBrokerFactory 
>>> .createApplicationContext(XBeanBrokerFactory.java:
>>> 91)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51)
>>>       at
>>> org
>>> .apache
>>> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>>>       at
>>> org
>>> .apache
>>> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>>>       at
>>> org
>>> .apache
>>> .activemq 
>>> .console.command.StartCommand.startBroker(StartCommand.java:
>>> 112)
>>>       at
>>> org
>>> .apache
>>> .activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>>>       at
>>> org
>>> .apache
>>> .activemq.console.command.ShellCommand.runTask(ShellCommand.java: 
>>> 104)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>>>       at
>>> org
>>> .apache 
>>> .activemq.console.command.ShellCommand.main(ShellCommand.java:
>>> 76)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at
>>> sun
>>> .reflect
>>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> sun
>>> .reflect
>>> .DelegatingMethodAccessorImpl
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at org.apache.activemq.console.Main.runTaskClass(Main.java: 
>>> 222)
>>>       at org.apache.activemq.console.Main.main(Main.java:106)
>>>
>>> This happens while trying to restore the store. After that new
>>> messages
>>> give:
>>> WARN  AMQMessageStore                - Message could not be added to
>>> long
>>> term store: Index: 2, Size: 2
>>> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>>>       at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>>       at java.util.ArrayList.get(ArrayList.java:322)
>>>       at
>>> org
>>> .apache
>>> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java: 
>>> 209)
>>>       at
>>> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java: 
>>> 149)
>>>       at
>>> org
>>> .apache 
>>> .activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java:
>>> 241)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store
>>> .kahadaptor
>>> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>>>       at
>>> org.apache.activemq.store.amq.AMQMessageStore
>>> $4.execute(AMQMessageStore.java:341)
>>>       at
>>> org
>>> .apache
>>> .activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .store.amq.AMQMessageStore.doAsyncWrite(AMQMessageStore.java:330)
>>>       at
>>> org
>>> .apache
>>> .activemq.store.amq.AMQMessageStore.asyncWrite(AMQMessageStore.java:
>>> 300)
>>>       at
>>> org.apache.activemq.store.amq.AMQMessageStore
>>> $1.iterate(AMQMessageStore.java:92)
>>>       at
>>> org
>>> .apache
>>> .activemq
>>> .thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>>>       at
>>> org.apache.activemq.thread.DedicatedTaskRunner
>>> $1.run(DedicatedTaskRunner.java:36)
>>>
>>> Can someone please advice.
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18502722.html
>>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18503026.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by qbeukes <qb...@add.za.net>.
that would help wouldn't it. Appologies. I don't know why I missed this part.

I tried both of these with the same data directory (the newer one downloaded
after this happens)
apache-activemq-5.0.0  apache-activemq-5.1.0

Then, it runs on:
video opt # ls -ld /etc/make.profile
lrwxrwxrwx 1 root root 46 Jan 15  2008 /etc/make.profile ->
/usr/portage/profiles/default-linux/x86/2006.1
video opt # cat /proc/version
Linux version 2.6.19-gentoo-r5 (root@livecd) (gcc version 4.1.1 (Gentoo
4.1.1-r3)) #2 SMP Thu Jan 17 08:31:04 SAST 2008
video opt # cat /etc/gentoo-release
Gentoo Base System release 1.12.9

That's it.
Q


rajdavies wrote:
> 
> which version ?
> On 17 Jul 2008, at 08:05, qbeukes wrote:
> 
>>
>> Hey,
>>
>> Our queues usually grow much faster than the database can accept  
>> data from
>> the consumer, so they tend to be very large. I'm not sure if this has
>> anything to do with it.
>>
>> But the service stopped responding (queue just kept growing, and  
>> consumer
>> wasn't reading any data).
>>
>> So I killed ActiveMQ. Now when I start it I am getting:
>> WARN  AMQMessageStore                - Could not replay add for  
>> message
>> 'ID:video.junkmail.co.za-57456-1211989603249-0:3521147:1:1:1'.   
>> Message may
>> have already been added. reason:  
>> java.lang.IndexOutOfBoundsException: Index:
>> 2, Size: 2
>> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>        at java.util.ArrayList.get(ArrayList.java:322)
>>        at
>> org 
>> .apache 
>> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209)
>>        at
>> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149)
>>        at
>> org 
>> .apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java: 
>> 241)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store 
>> .kahadaptor 
>> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store.amq.AMQMessageStore.replayAddMessage(AMQMessageStore.java:173)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store.amq.AMQPersistenceAdapter.recover(AMQPersistenceAdapter.java: 
>> 495)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:212)
>>        at
>> org 
>> .apache 
>> .activemq.broker.BrokerService.createRegionBroker(BrokerService.java: 
>> 1448)
>>        at
>> org 
>> .apache 
>> .activemq.broker.BrokerService.createBroker(BrokerService.java:1400)
>>        at
>> org 
>> .apache.activemq.broker.BrokerService.getBroker(BrokerService.java: 
>> 513)
>>        at
>> org.apache.activemq.broker.BrokerService.start(BrokerService.java:422)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java: 
>> 46)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .AbstractAutowireCapableBeanFactory 
>> .createBean(AbstractAutowireCapableBeanFactory.java:425)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory 
>> $1.getObject(AbstractBeanFactory.java:251)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .DefaultSingletonBeanRegistry 
>> .getSingleton(DefaultSingletonBeanRegistry.java:156)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>        at
>> org 
>> .springframework 
>> .beans 
>> .factory 
>> .support 
>> .DefaultListableBeanFactory 
>> .preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>>        at
>> org 
>> .springframework 
>> .context 
>> .support 
>> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
>> 352)
>>        at
>> org 
>> .apache 
>> .xbean 
>> .spring 
>> .context 
>> .ResourceXmlApplicationContext 
>> .<init>(ResourceXmlApplicationContext.java:64)
>>        at
>> org 
>> .apache 
>> .xbean 
>> .spring 
>> .context 
>> .ResourceXmlApplicationContext 
>> .<init>(ResourceXmlApplicationContext.java:52)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .xbean 
>> .XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java: 
>> 91)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51)
>>        at
>> org 
>> .apache 
>> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>>        at
>> org 
>> .apache 
>> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>>        at
>> org 
>> .apache 
>> .activemq.console.command.StartCommand.startBroker(StartCommand.java: 
>> 112)
>>        at
>> org 
>> .apache 
>> .activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>>        at
>> org 
>> .apache 
>> .activemq.console.command.ShellCommand.runTask(ShellCommand.java:104)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>>        at
>> org 
>> .apache.activemq.console.command.ShellCommand.main(ShellCommand.java: 
>> 76)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun 
>> .reflect 
>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>> sun 
>> .reflect 
>> .DelegatingMethodAccessorImpl 
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>>        at org.apache.activemq.console.Main.main(Main.java:106)
>>
>> This happens while trying to restore the store. After that new  
>> messages
>> give:
>> WARN  AMQMessageStore                - Message could not be added to  
>> long
>> term store: Index: 2, Size: 2
>> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>        at java.util.ArrayList.get(ArrayList.java:322)
>>        at
>> org 
>> .apache 
>> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209)
>>        at
>> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149)
>>        at
>> org 
>> .apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java: 
>> 241)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store 
>> .kahadaptor 
>> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>>        at
>> org.apache.activemq.store.amq.AMQMessageStore 
>> $4.execute(AMQMessageStore.java:341)
>>        at
>> org 
>> .apache 
>> .activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .store.amq.AMQMessageStore.doAsyncWrite(AMQMessageStore.java:330)
>>        at
>> org 
>> .apache 
>> .activemq.store.amq.AMQMessageStore.asyncWrite(AMQMessageStore.java: 
>> 300)
>>        at
>> org.apache.activemq.store.amq.AMQMessageStore 
>> $1.iterate(AMQMessageStore.java:92)
>>        at
>> org 
>> .apache 
>> .activemq 
>> .thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>>        at
>> org.apache.activemq.thread.DedicatedTaskRunner 
>> $1.run(DedicatedTaskRunner.java:36)
>>
>> Can someone please advice.
>> -- 
>> View this message in context:
>> http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18502722.html
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18503026.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Urgent java.lang.IndexOutOfBoundsException in ActiveMQ Kaha Storage - Data lost?

Posted by Rob Davies <ra...@gmail.com>.
which version ?
On 17 Jul 2008, at 08:05, qbeukes wrote:

>
> Hey,
>
> Our queues usually grow much faster than the database can accept  
> data from
> the consumer, so they tend to be very large. I'm not sure if this has
> anything to do with it.
>
> But the service stopped responding (queue just kept growing, and  
> consumer
> wasn't reading any data).
>
> So I killed ActiveMQ. Now when I start it I am getting:
> WARN  AMQMessageStore                - Could not replay add for  
> message
> 'ID:video.junkmail.co.za-57456-1211989603249-0:3521147:1:1:1'.   
> Message may
> have already been added. reason:  
> java.lang.IndexOutOfBoundsException: Index:
> 2, Size: 2
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>        at java.util.ArrayList.get(ArrayList.java:322)
>        at
> org 
> .apache 
> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209)
>        at
> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149)
>        at
> org 
> .apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java: 
> 241)
>        at
> org 
> .apache 
> .activemq 
> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>        at
> org 
> .apache 
> .activemq 
> .store 
> .kahadaptor 
> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>        at
> org 
> .apache 
> .activemq 
> .store.amq.AMQMessageStore.replayAddMessage(AMQMessageStore.java:173)
>        at
> org 
> .apache 
> .activemq 
> .store.amq.AMQPersistenceAdapter.recover(AMQPersistenceAdapter.java: 
> 495)
>        at
> org 
> .apache 
> .activemq 
> .store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:212)
>        at
> org 
> .apache 
> .activemq.broker.BrokerService.createRegionBroker(BrokerService.java: 
> 1448)
>        at
> org 
> .apache 
> .activemq.broker.BrokerService.createBroker(BrokerService.java:1400)
>        at
> org 
> .apache.activemq.broker.BrokerService.getBroker(BrokerService.java: 
> 513)
>        at
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:422)
>        at
> org 
> .apache 
> .activemq 
> .xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java: 
> 46)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .AbstractAutowireCapableBeanFactory 
> .createBean(AbstractAutowireCapableBeanFactory.java:425)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory 
> $1.getObject(AbstractBeanFactory.java:251)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultSingletonBeanRegistry 
> .getSingleton(DefaultSingletonBeanRegistry.java:156)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>        at
> org 
> .springframework 
> .beans 
> .factory 
> .support 
> .DefaultListableBeanFactory 
> .preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>        at
> org 
> .springframework 
> .context 
> .support 
> .AbstractApplicationContext.refresh(AbstractApplicationContext.java: 
> 352)
>        at
> org 
> .apache 
> .xbean 
> .spring 
> .context 
> .ResourceXmlApplicationContext 
> .<init>(ResourceXmlApplicationContext.java:64)
>        at
> org 
> .apache 
> .xbean 
> .spring 
> .context 
> .ResourceXmlApplicationContext 
> .<init>(ResourceXmlApplicationContext.java:52)
>        at
> org 
> .apache 
> .activemq 
> .xbean 
> .XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java: 
> 91)
>        at
> org 
> .apache 
> .activemq 
> .xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51)
>        at
> org 
> .apache 
> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>        at
> org 
> .apache 
> .activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>        at
> org 
> .apache 
> .activemq.console.command.StartCommand.startBroker(StartCommand.java: 
> 112)
>        at
> org 
> .apache 
> .activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>        at
> org 
> .apache 
> .activemq 
> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>        at
> org 
> .apache 
> .activemq.console.command.ShellCommand.runTask(ShellCommand.java:104)
>        at
> org 
> .apache 
> .activemq 
> .console.command.AbstractCommand.execute(AbstractCommand.java:51)
>        at
> org 
> .apache.activemq.console.command.ShellCommand.main(ShellCommand.java: 
> 76)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>        at org.apache.activemq.console.Main.main(Main.java:106)
>
> This happens while trying to restore the store. After that new  
> messages
> give:
> WARN  AMQMessageStore                - Message could not be added to  
> long
> term store: Index: 2, Size: 2
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>        at java.util.ArrayList.get(ArrayList.java:322)
>        at
> org 
> .apache 
> .activemq.kaha.impl.index.hash.HashBin.addHashEntry(HashBin.java:209)
>        at
> org.apache.activemq.kaha.impl.index.hash.HashBin.put(HashBin.java:149)
>        at
> org 
> .apache.activemq.kaha.impl.index.hash.HashIndex.store(HashIndex.java: 
> 241)
>        at
> org 
> .apache 
> .activemq 
> .kaha.impl.container.MapContainerImpl.put(MapContainerImpl.java:304)
>        at
> org 
> .apache 
> .activemq 
> .store 
> .kahadaptor 
> .KahaReferenceStore.addMessageReference(KahaReferenceStore.java:118)
>        at
> org.apache.activemq.store.amq.AMQMessageStore 
> $4.execute(AMQMessageStore.java:341)
>        at
> org 
> .apache 
> .activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
>        at
> org 
> .apache 
> .activemq 
> .store.amq.AMQMessageStore.doAsyncWrite(AMQMessageStore.java:330)
>        at
> org 
> .apache 
> .activemq.store.amq.AMQMessageStore.asyncWrite(AMQMessageStore.java: 
> 300)
>        at
> org.apache.activemq.store.amq.AMQMessageStore 
> $1.iterate(AMQMessageStore.java:92)
>        at
> org 
> .apache 
> .activemq 
> .thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>        at
> org.apache.activemq.thread.DedicatedTaskRunner 
> $1.run(DedicatedTaskRunner.java:36)
>
> Can someone please advice.
> -- 
> View this message in context: http://www.nabble.com/Urgent-java.lang.IndexOutOfBoundsException-in-ActiveMQ-Kaha-Storage---Data-lost--tp18502722p18502722.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>