Activemq无法启动linux mint17

时间:2015-07-09 06:54:15

标签: activemq linuxmint

执行activemq控制台后,请参阅以下控制台输出 命令:

/opt/apache-activemq-5.5.1/bin $ sudo activemq console sudo:/ var / lib / sudo / vivek可由非所有者写入(040777),应该是模式0700 vivek的[sudo]密码: 信息:正在加载' / usr / share / activemq / activemq-options' 信息:使用java' / usr / bin / java' 信息:从前台开始,这仅用于调试目的(按CTRL + C停止进程) 信息:改为用户' activemq'调用java mkdir:缺少操作数 试试mkdir --help'欲获得更多信息。 Java Runtime:Oracle Corporation 1.8.0_45 / usr / lib / jvm / java-8-oracle / jre   堆大小:电流= 502784k自由= 492256k max = 502784k     JVM args:-Xms512M -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner = true -Dcom.sun.management.jmxremote -Djava.io.tmpdir = / var / lib / activemq / tmp -Dactivemq.classpath = / var / lib /的ActiveMQ / CONF; -Dactivemq.home = / usr / share / activemq -Dactivemq.base = / var / lib / activemq / -Dactivemq.conf = / var / lib / activemq / conf -Dactivemq.data = / var / lib / activemq / data ACTIVEMQ_HOME:/ usr / share / activemq ACTIVEMQ_BASE:/ var / lib / activemq ACTIVEMQ_CONF:/ var / lib / activemq / conf ACTIVEMQ_DATA:/ var / lib / activemq / data 从以下位置加载消息代理:xbean:activemq.xml log4j:WARN找不到logger(org.apache.activemq.xbean.XBeanBrokerFactory)的appender。 log4j:WARN请正确初始化log4j系统。 log4j:WARN有关详细信息,请参阅http://logging.apache.org/log4j/1.2/faq.html#noconfig。 错误:java.lang.RuntimeException:无法执行启动任务。原因:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在 java.lang.RuntimeException:无法执行启动任务。原因:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)     在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)     在org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)     在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)     在org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.apache.activemq.console.Main.runTaskClass(Main.java:257)     在org.apache.activemq.console.Main.main(Main.java:111) 引起:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)     at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)     在org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)     在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)     在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:64)     在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:52)     在org.apache.activemq.xbean.XBeanBrokerFactory $ 1.(XBeanBrokerFactory.java:108)     at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)     在org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)     在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)     在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)     在org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)     在org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)     ......还有10个 引起:java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)     ......还有25个 错误:java.lang.Exception:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在 java.lang.Exception:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)     在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)     在org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)     在org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)     在org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.apache.activemq.console.Main.runTaskClass(Main.java:257)     在org.apache.activemq.console.Main.main(Main.java:111) 引起:org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[activemq.xml]解析XML文档;嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)     at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)     at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)     在org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)     在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)     在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:64)     在org.apache.xbean.spring.context.ResourceXmlApplicationContext。(ResourceXmlApplicationContext.java:52)     在org.apache.activemq.xbean.XBeanBrokerFactory $ 1.(XBeanBrokerFactory.java:108)     at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)     在org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)     在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)     在org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)     在org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)     在org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)     ......还有10个 引起:java.io.FileNotFoundException:无法打开类路径资源[activemq.xml],因为它不存在     在org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)     在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)     ......还有25个

1 个答案:

答案 0 :(得分:2)

您需要在activemq / conf路径中部署配置文件。 您可以下载最后一个配置文件: http://activemq.apache.org/xml-configuration.html 。我在使用apt-get在Ubuntu上部署activemq时遇到了相同的问题。 配置文件存储在其他路径中:

/etc/activemq/instances-available/main/activemq.xml

我将此文件链接到/ var / lib / activemq / conf文件夹

sudo su -
su activemq
mkdir /var/lib/activemq/conf
ln -s /etc/activemq/instances-available/main/activemq.xml /var/lib/activemq/conf/