Description
Its that darn rbac stuff that they make to strict that a system bundle like camel-karaf-commands cannot even call a operation on a mbean. It has bitten so many users - darn you!
2015-07-14 09:46:17,770 | ERROR | l Console Thread | Console | ? ? | 17 - org.apache.karaf.shell.console - 2.4.2 | Exception caught while executing command javax.management.MBeanException: RuntimeException thrown in RequiredModelMBean while trying to invoke operation dumpRouteStatsAsXml at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1282)[:1.7.0_45] at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1081)[:1.7.0_45] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[:1.7.0_45] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:80)[karaf-jmx-boot.jar:] at com.sun.proxy.$Proxy0.invoke(Unknown Source)[:] at org.apache.camel.commands.AbstractLocalCamelController.getRouteStatsAsXml(AbstractLocalCamelController.java:376) at org.apache.camel.commands.RouteProfileCommand.executeOnRoute(RouteProfileCommand.java:63) at org.apache.camel.commands.AbstractRouteCommand.execute(AbstractRouteCommand.java:56) at org.apache.camel.karaf.commands.RouteProfile.doExecute(RouteProfile.java:36) at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38) at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[11:org.apache.aries.proxy.impl:1.0.4] at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[11:org.apache.aries.proxy.impl:1.0.4] at org.apache.karaf.shell.console.commands.$BlueprintCommand216744734.execute(Unknown Source)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[17:org.apache.karaf.shell.console:2.4.2] at org.apache.karaf.shell.console.jline.Console.run(Console.java:195)[17:org.apache.karaf.shell.console:2.4.2] at java.lang.Thread.run(Thread.java:744)[:1.7.0_45] Caused by: java.lang.SecurityException: Insufficient roles/credentials for operation at org.apache.karaf.management.KarafMBeanServerGuard.handleInvoke(KarafMBeanServerGuard.java:301) at org.apache.karaf.management.KarafMBeanServerGuard.handleGetAttribute(KarafMBeanServerGuard.java:221) at org.apache.karaf.management.KarafMBeanServerGuard.invoke(KarafMBeanServerGuard.java:89) at org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:63)[karaf-jmx-boot.jar:] at com.sun.proxy.$Proxy0.getAttribute(Unknown Source)[:] at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:267)[:1.7.0_45] at com.sun.proxy.$Proxy41.getRouteId(Unknown Source) at org.apache.camel.management.mbean.ManagedRoute.dumpRouteStatsAsXml(ManagedRoute.java:294) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)[:1.7.0_45] at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1249)[:1.7.0_45] at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_45] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)[:1.7.0_45] at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1243)[:1.7.0_45] ... 30 more
Also karaf do not log the command that caused this, it just says error while executing command.