我一直在尝试在 activemq apache-apollo 1.6 安装上创建一个代理。当我执行以下命令时:
$APOLLO_HOME/bin/apollo create log1broker
我收到以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/local/lib64/activemq/apache-apollo-1/6
Caused by: java.lang.ClassNotFoundException: .usr.local.lib64.activemq.apache-apollo-1.6
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: /usr/local/lib64/activemq/apache-apollo-1.6. Program will exit.
答案1
发生这种情况是因为apollo
启动脚本假定您的PWD
是$APOLLO_HOME
。
请按照这个顺序进行:
$ cd $APOLLO_HOME
$ ./bin/apollo create log1broker