Error

You get something like this

Description

Each broker needs to have its own directory to store its journal files etc. The error indicates that you have 2 brokers sharing the same files.

A common cause of this exception is that you are running two brokers on one machine using the same config file pointing to the same directory. So a work around is to parameterise the directory name via Spring's property syntax - or just create another configuration file so that the second broker uses a different directory.

Another cause of this problem is if you are using the vm://localhost style transport in a JMS client with the JMS connection starting before you have initialised your broker. If you create a vm transport connection, it will auto-create a broker if there is not one running already; so you can end up creating 2 brokers by accident. The work around is to make sure that the JMS connection factory you are using depends on the broker you are configuring (e.g. in Spring use a depends-on attribute on the connection factory to make it depend on the broker). This will ensure that the broker is initialized first before the connection factory.

Be careful with broker names and URIs

Icon

Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which do not allow things like underscores in them etc.

This problem could also be caused by a bad OS and JVM combination

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram