NPE when upgrading from 5.5.1-fuse-00-08 to 551-fuse-01-20
dominict Jan 19, 2012 2:39 AMWhen upgrading from 5.5.1-fuse-00-08 to the latest distro 551-fuse-01-20, the broker will not start due to errors loading the Kahadb. The exception that is thrown on startup is:
=======
ERROR | Failed to start ActiveMQ JMS Message Broker (localhost, null). Reason: java.io.EOFException
java.io.EOFException
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
at org.apache.kahadb.page.PageFile.readPage(PageFile.java:827)
at org.apache.kahadb.page.Transaction.load(Transaction.java:412)
at org.apache.kahadb.page.Transaction.load(Transaction.java:362)
at org.apache.kahadb.index.BTreeIndex.load(BTreeIndex.java:159)
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.load(MessageDatabase.java:2375)
at org.apache.activemq.store.kahadb.MessageDatabase.loadStoredDestination(MessageDatabase.java:1706)
at org.apache.activemq.store.kahadb.MessageDatabase.access$100(MessageDatabase.java:97)
at org.apache.activemq.store.kahadb.MessageDatabase$2.execute(MessageDatabase.java:277)
at org.apache.kahadb.page.Transaction.execute(Transaction.java:765)
at org.apache.activemq.store.kahadb.MessageDatabase.loadPageFile(MessageDatabase.java:273)
at org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:337)
at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:387)
at org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:235)
at org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:175)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:54)
at org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.start(KahaDBPersistenceAdapter.java:193)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:508)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
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$1.<init>(XBeanBrokerFactory.java:106)
at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:106)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:71)
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:115)
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:251)
at org.apache.activemq.console.Main.main(Main.java:107)
======
The broker then attempts to stop, but reports similar NPE's.
This is replicable from the distribution zip's if you download 551-00-08 start it up, and in the admin console do:
- create a durable topic subscriber (any name)
- send a perisistent message to a topic (not the topic the durable subscriber is registered against)
- stop the broker
- copy the data/ to a 551-01-20 distro, and attempt to start up the broker.
All is fine if I delete the kahadb/db.data and startup.
Just wondering if anyone else has come across this issue when upgrading. I was wondering if it was perhaps related to http://fusesource.com/issues/browse/MB-1035 (I can't comment on the ticket).
Cheers in advance
/dom