Strange...
I have 2 bundles which uses "buddy class loading" e.g. <Eclipse-BuddyPolicy> in the pom file in order to work with (framework=equinox).
When servicemix is shutdown and restarted the broker will not start and remains in state. Starting it, throws an exception first time, but second time it starts.
This is what is did:
Using feature set (etc/org.apache.karaf.features.cfg):
featuresBoot=config,activemq-broker,camel,camel-jms
START:
bin/servicemix
(1) - CHECK
karaf@root> list
activemq-core (5.4.2.fuse-01-00)
...
karaf@root> activemq:list --jmxlocal
BrokerName = default
Everything is OK!
(2) - INSTALL BUNDLES AND CHECK AGAIN
/*
these bundles are part of apache ftpserver examples and have only been modified with the following minor changes (because of classloading problems when creating services using both bundles):
In order to get it to work using framework=equinox, I added
<Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy> to pom and
<Eclipse-BuddyPolicy>org.apache.ftpserver.ftplet</Eclipse-BuddyPolicy>
When using framework=felix, the "uses" constraint solved the issues i had. But "uses" constraint wasn't enough with equinox
*/
karaf@root> install -s mvn:org.apache.ftpserver/ftplet-api/1.0.5
Bundle ID: 79
karaf@root> install -s mvn:org.apache.ftpserver/ftpserver-core/1.0.5
Bundle ID: 80
karaf@root> list
Everything is OK!
(3) - SHUTDOWN, START AND CHECK
(Somethime I have to do this a few time to reproduce the following "condition")
karaf@root> shutdown
$bin/servicenix
activemq-core (5.4.2.fuse-01-00)
...
karaf@root> start 43
Error executing command: Exception in org.apache.activemq.util.osgi.Activator.start() of bundle org.apache.activemq.activemq-core.
karaf@root> start 43
(4) - CHECK AGAIN
Now Its OK! but only until next shutdown/re-start