ActiveMQ in ServiceMix jmx problem

When you try to list your ActiveMQ brokers in ServiceMix you may run into the following jmx problem:

karaf@root> activemq:list
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi
java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi
        at org.apache.activemq.console.command.ListCommand.runTask(ListCommand.java:52)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:292)
        at org.apache.activemq.karaf.commands.ActiveMQCommandSupport.doExecute(ActiveMQCommandSupport.java:46)
        at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:41)
        at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
        at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
        at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
        at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
        at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
        at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:181)
        at java.lang.Thread.run(Thread.java:619)
Error executing command: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException: jmxrmi

The solution is simple, add the option –jmxlocal, and documented in Deploying into the OSGi Container:

karaf@root> activemq:list --jmxlocal
BrokerName = default