ActiveMQ embedded broker, exception in shutdown hook
I get the following error on shutdown, using an embedded broker:
Exception in thread "ActiveMQ ShutdownHook" java.lang.NoClassDefFoundError: org/apache/activemq/broker/BrokerService
Have I misconfigured something possibly? I used the config spelled out on the activemq page here:
(the configuration labeled "using spring-2.0" at the bottom). The messages are being delivered properly etc. so I'm not sure if this error is harmless.
This is an old issue that can occur when ActiveMQ is embedded and not configured 100% correct. The only thing that is left out in the config you linked is to add useShutdownHook="false" to the <broker> element of the XML config. Below is a quick example:
<amq:broker useJmx="false" persistent="false" useShutdownHook="false"> ... </amq:broker>
This will disable the shutdown hook and prevent this problem from occurring.