开发者社区> 问答> 正文

ActiveMQ启动报错,大家帮忙看下?报错

2014-07-03 10:42:38,178 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space | org.apache.activemq.xbean.XBeanBrokerFactory | main

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

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:104)

at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)

at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)

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.runTask(StartCommand.java:87)

at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)

at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)

at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)

at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.activemq.console.Main.runTaskClass(Main.java:262)

at org.apache.activemq.console.Main.main(Main.java:115)

Caused by: java.lang.OutOfMemoryError: Java heap space

at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessor.readRecord(DataFileAccessor.java:87)

at org.apache.activemq.store.kahadb.disk.journal.Journal.read(Journal.java:604)

at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:996)

at org.apache.activemq.store.kahadb.MessageDatabase.recoverAckMessageFileMap(MessageDatabase.java:691)

at org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:582)

at org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:398)

at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:416)

at org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:260)

at org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:194)

at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)

at org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:215)

at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)

at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:640)

at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:629)

at org.apache.activemq.broker.BrokerService.start(BrokerService.java:594)

at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

展开
收起
爱吃鱼的程序员 2020-06-20 16:51:09 1385 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    JVMheap溢出?放大heapsize试试执行java-Xms1024m-Xmx4096mmemory报无法修改...把ActiveMQ重新部署后启动成功,原因还是没找到,剩余内存不小了。是不是<spanstyle="font-family:SimSun;line-height:22px;background-color:#FFFFFF;">kahadb里面存的 topic、queue或者持久化的message太多了初步判断是因为activemq.xml文件编辑的时候标签弄乱了。发出来jvm参数看看楼主,请问你这个问题解决了么?当初是什么原因导致又是如何解决的呢?<spanstyle="font-size:13.3333px;">我也遇到了这个问题,最后发现是mysql的驱动的问题,我换了个更高版本的驱动就好了。

    有可能是配的持久化问题

    2020-06-20 16:51:28
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
The Avant-garde of Apache NiFi 立即下载
Apache NiFi 1.0 in Nutshell 立即下载
低代码开发师(初级)实战教程 立即下载