Java消息中间件ActiveMQ-5.11.1启动失败解决办法

异常信息:

Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@3f1b7a14: startup date [Tue Aug 16 16:00:10 CST 2016]; root of context hierarchy
	at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1059)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)[activemq-spring-5.11.1.jar:5.11.1]
	at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:826)[activemq-broker-5.11.1.jar:5.11.1]
	at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)[activemq-spring-5.11.1.jar:5.11.1]
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:612)[activemq-broker-5.11.1.jar:5.11.1]
	at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)[activemq-spring-5.11.1.jar:5.11.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]
	at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64)[xbean-spring-3.18.jar:3.18]
	at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52)[xbean-spring-3.18.jar:3.18]
	at org.apache.activemq.xbean.XBeanBrokerFactory$1.(XBeanBrokerFactory.java:104)[activemq-spring-5.11.1.jar:5.11.1]
	at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.11.1.jar:5.11.1]
	at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.11.1.jar:5.11.1]
	at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.11.1.jar:5.11.1]
	at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.11.1.jar:5.11.1]
	at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.11.1.jar:5.11.1]
	at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1]
	at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.11.1.jar:5.11.1]
	at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1]
	at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.11.1.jar:5.11.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]
	at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.11.1]
	at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.11.1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]
	at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]
	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)[wrapper.jar:3.2.3]
	at java.lang.Thread.run(Unknown Source)[:1.7.0_79]
解决办法:

1.确认计算机主机名名称没有下划线;(如果有请去掉下划线,linux,windows都可能出现这个问题)
2.如果是win7,停止ICS服务,cmd里输入services.msc找到Internet Connection Sharing (ICS)服务,停止该服务,并改成手动启动或禁用


你可能感兴趣的:(Java消息中间件ActiveMQ-5.11.1启动失败解决办法)