问题描述
我有一个Ubuntu机器12.04版本.
I have a Ubuntu machine 12.04 version.
我使用以下命令安装activemq
:
#sudo apt-get install activemq
默认情况下,apt-get仅在端口61616上安装activemq 5.5
核心服务.
By the default apt-get only install activemq 5.5
core service on port 61616.
现在,我要在端口8161上设置码头管理控制台.
Now I want the jetty admin console on port 8161.
我试图将jetty.xml
复制到/etc/activemq/instances-available/main/
并将导入内容添加到activemq.xml
.
I've tried to copy the jetty.xml
to /etc/activemq/instances-available/main/
and add the import to activemq.xml
.
然后在控制台模式下运行activemq
时出现以下错误
Then the following error came when I run activemq
in console mode
ERROR: java.lang.Exception: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: org.eclipse.jetty.security.HashLoginService. Reason: java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService
java.lang.Exception: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: org.eclipse.jetty.security.HashLoginService. Reason: java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
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:616)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: org.eclipse.jetty.security.HashLoginService. Reason: java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService
at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:75)
at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.coerceNamespaceAwarePropertyValues(XBeanQNameHelper.java:54)
at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parseBeanDefinitionElement(XBeanBeanDefinitionParserDelegate.java:59)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:396)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:365)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.processBeanDefinition(XBeanBeanDefinitionDocumentReader.java:174)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement(XBeanBeanDefinitionDocumentReader.java:101)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:81)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.importBeanDefinitionResource(XBeanBeanDefinitionDocumentReader.java:129)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement(XBeanBeanDefinitionDocumentReader.java:95)
at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:81)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 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)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
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:114)
at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:114)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:70)
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:91)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.security.HashLoginService
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass(XBeanQNameHelper.java:107)
at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:72)
... 46 more
如何解决此问题?谢谢,谢谢.
How to FIX this? Thanks advanced.
推荐答案
当前Debian/Ubuntu ActiveMQ软件包不完整".
Currently the Debian/Ubuntu ActiveMQ packages are 'incomplete'.
摘录自/usr/share/doc/libactivemq-java/README.Debian :
但是/usr/share/doc/libactivemq-java/README.Debian 中没有禁用模块的列表.
But there is no list of disabled modules in /usr/share/doc/libactivemq-java/README.Debian.
要解决此问题,请从以下网址下载ActiveMQ 5.6二进制tar归档文件: http://activemq.apache.org/download.html .
To solve the issues download the ActiveMQ 5.6 binary tar archive from: http://activemq.apache.org/download.html.
提取tar存档并将缺少的库/文件/目录复制到:/usr/share/activemq/.
Extract the tar archive and copy the missing libraries/files/directories to: /usr/share/activemq/.
例如:
cd /tmp
wget http://apache.proserve.nl/activemq/apache-activemq/5.6.0/apache-activemq-5.6.0-bin.tar.gz
tar zxvf apache-activemq-5.6.0-bin.tar.gz
cd apache-activemq-5.6.0/lib
rm activemq-console-5.6.0.jar activemq-core-5.6.0.jar activemq-jaas-5.6.0.jar activemq-protobuf-1.1.jar activemq-rar.txt kahadb-5.6.0.jar slf4j-api-1.6.4.jar jcl-over-slf4j-1.6.4.jar
cd -
sudo cp -r apache-activemq-5.6.0/lib/* /usr/share/activemq/lib
sudo cp -r apache-activemq-5.6.0/webapps /usr/share/activemq
启用ActiveMQ Jetty配置并重新启动ActiveMQ:
Enable the ActiveMQ Jetty configuration and restart ActiveMQ:
sudo service activemq restart
这篇关于如何使用apt-get命令安装或配置activemq admin cosole(jetty)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!