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:

http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

(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.

Answers


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.


Need Your Help

monad tranformers and stacking of multiple monads

haskell monads functional-programming monad-transformers

I have function f with signature f :: [a] -&gt; StateT Int Reader b [c], and f' with signature f' :: a -&gt; StateT Int Reader b [c]

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.