1

I am starting an active mq broker using my own config file:

./apache-activemq-5.6.0/bin/activemq console xbean:custom-broker.xml

The broker is using some classes I have defined which reside in a jar. For a while now I was just sticking the jar in the activemq lib folder, and everything worked fine. However I would now like for active mq to pick up the jar from a different folder, something which the --extdir option claims to be capable of doing. However I can't get it to work. I am executing the command:

./apache-activemq-5.6.0/bin/activemq console xbean:custom-broker.xml --extdir ../mylib/

where the jar in question is located in mylib, and am getting ClassNotFoundException every time.

What am I missing?

2
  • Where did you find --extdir option? You may need to point jvm to external libs directory instead. Jul 18, 2012 at 10:23
  • @GermannArlington if you type activemq -? you will see the extdir option listed. How can I point jvm to external libs directory? Jul 18, 2012 at 11:32

1 Answer 1

1

Resolved. --extdir does work as expected, turns out someone changed the name of one of the packages by like 1 character, and this is why activemq couldnt find the class in question in the jar :P. Also worth noting that if you want to add multiple folders to active mq's classpath, then you need to repeat --extdir multiple times, as in "--extdir foldr1 --extdir foldr2" as documented here:

http://activemq.2283324.n4.nabble.com/Is-there-anyway-to-get-activeMQ-to-pick-up-a-jar-at-runtime-other-than-adding-it-to-the-activemqinst-td4654121.html#a4654190

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.