我通过自制软件安装了ActiveMQ 5.9.0,但是当我尝试通过'bin / activemq console'启动activemq时,它最终会出现以下异常:
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
java.lang.RuntimeException: Failed to execute start task. Reason: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:137)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:83)
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:601)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
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:74)
... 10 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getConstructor0(Class.java:2723)
at java.lang.Class.newInstance0(Class.java:345)
at java.lang.Class.newInstance(Class.java:327)
at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:61)
at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:146)
at org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
... 14 more
Caused by: java.lang.ClassNotFoundException: org.springframework.core.io.FileSystemResource
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 22 more
ERROR: java.lang.Exception: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
java.lang.Exception: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
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:137)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:83)
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:601)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: java.io.IOException: Could not load xbean factory:java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:43)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:70)
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:74)
... 10 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/io/FileSystemResource
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getConstructor0(Class.java:2723)
at java.lang.Class.newInstance0(Class.java:345)
at java.lang.Class.newInstance(Class.java:327)
at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:61)
at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:146)
at org.apache.activemq.broker.BrokerFactory.createBrokerFactoryHandler(BrokerFactory.java:41)
... 14 more
Caused by: java.lang.ClassNotFoundException: org.springframework.core.io.FileSystemResource
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 22 more
答案 0 :(得分:0)
似乎缺少jar,其中包含activeMQ库中的类org.springframework.core.io.FileSystemResource
。