[
https://issues.apache.org/jira/browse/KARAF-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14062015#comment-14062015
]
Guillaume Nodet commented on KARAF-3114:
----------------------------------------
When run from the command or JMX, the user needs to have the required role to
perform the heap dump, but that should not otherwise be an issue I think.
> Call to ManagementFactory.getPlatformMBeanServer() fail due to RBAC
> -------------------------------------------------------------------
>
> Key: KARAF-3114
> URL: https://issues.apache.org/jira/browse/KARAF-3114
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core, karaf-security
> Affects Versions: 3.0.1
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Fix For: 2.4.0, 4.0.0, 3.0.2
>
>
> With the introduction of the RBAC support to secure the JMX layer, a simple
> ManagementFactory.getPlatformMBeanServer() fails with something like:
> {code}
> java.lang.NullPointerException
> at
> org.apache.karaf.management.KarafMBeanServerGuard.canBypassRBAC(KarafMBeanServerGuard.java:236)
> at
> org.apache.karaf.management.KarafMBeanServerGuard.handleInvoke(KarafMBeanServerGuard.java:259)
> at
> org.apache.karaf.management.KarafMBeanServerGuard.invoke(KarafMBeanServerGuard.java:78)
> at
> org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:63)[karaf-jmx-boot.jar:]
> at com.sun.proxy.$Proxy0.invoke(Unknown Source)[:]
> at
> com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)[:1.7.0_60]
> at
> com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)[:1.7.0_60]
> at
> javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:252)[:1.7.0_60]
> at com.sun.proxy.$Proxy19.dumpHeap(Unknown Source)[:]
> at
> org.apache.karaf.diagnostic.core.internal.HeapDumpProvider.createDump(HeapDumpProvider.java:45)
> {code}
> A workaround is to use a JMXServiceURL and JMXConnector instead, but it could
> be disturbing for the users.
--
This message was sent by Atlassian JIRA
(v6.2#6252)