我使用“tcp:// localhost:61616?useJmx = false& persistent = false”通过Maven运行ActiveMQ。 ActiveMQ使用Maven构建正确运行,并且我的集成测试成功触发。所有测试都通过,maven构建成功。但是,当activeMQ关闭时,它会显示错误,如下所示: -
Exception in thread "ActiveMQ ShutdownHook" java.lang.NoClassDefFoundError: org/apache/activemq/transport/vm/VMTransportFactory
at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:750)
at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:91)
at org.apache.activemq.broker.BrokerService.containerShutdown(BrokerService.java:2303)
at org.apache.activemq.broker.BrokerService$6.run(BrokerService.java:2270)
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.transport.vm.VMTransportFactory
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
... 4 more
如何在没有上述错误的情况下顺利关闭ActiveMQ?