ActiveMQ在win7下启动失败解决方案

转自 : http://blog.csdn.net/xiaobao5214/article/details/52222655

异常信息:

[java]  view plain  copy
  1. Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain  
  2. 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  
  3.     at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  4.     at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1059)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  5.     at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  6.     at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)[activemq-spring-5.11.1.jar:5.11.1]  
  7.     at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:826)[activemq-broker-5.11.1.jar:5.11.1]  
  8.     at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)[activemq-spring-5.11.1.jar:5.11.1]  
  9.     at org.apache.activemq.broker.BrokerService.start(BrokerService.java:612)[activemq-broker-5.11.1.jar:5.11.1]  
  10.     at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)[activemq-spring-5.11.1.jar:5.11.1]  
  11.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]  
  12.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  13.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  14.     at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]  
  15.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1640)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  16.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1581)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  17.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  18.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  19.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  20.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  21.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  22.     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  23.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  24.     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  25.     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  26.     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)[spring-context-3.2.11.RELEASE.jar:3.2.11.RELEASE]  
  27.     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64)[xbean-spring-3.18.jar:3.18]  
  28.     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52)[xbean-spring-3.18.jar:3.18]  
  29.     at org.apache.activemq.xbean.XBeanBrokerFactory$1.(XBeanBrokerFactory.java:104)[activemq-spring-5.11.1.jar:5.11.1]  
  30.     at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.11.1.jar:5.11.1]  
  31.     at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.11.1.jar:5.11.1]  
  32.     at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.11.1.jar:5.11.1]  
  33.     at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.11.1.jar:5.11.1]  
  34.     at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.11.1.jar:5.11.1]  
  35.     at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1]  
  36.     at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.11.1.jar:5.11.1]  
  37.     at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.11.1.jar:5.11.1]  
  38.     at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.11.1.jar:5.11.1]  
  39.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]  
  40.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  41.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  42.     at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]  
  43.     at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.11.1]  
  44.     at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.11.1]  
  45.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]  
  46.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  47.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_79]  
  48.     at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_79]  
  49.     at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)[wrapper.jar:3.2.3]  
  50.     at java.lang.Thread.run(Unknown Source)[:1.7.0_79]  
解决办法:

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

你可能感兴趣的:(消息队列)