Note that there are some explanatory texts on larger screens.

plurals
  1. POargument type mismatch in mbeanServer.invoke
    primarykey
    data
    text
    <p>Ok, so. I've got a war deployed with an MBean exposed through spring's MBeanExporter and annotations. I have another war app deployed which is using some code to talk to the mbean. I'm having an issue calling the function on the mbean from that client code.</p> <p>RuntimeException occurred in RequiredModelMBean while trying to invoke operation getPermissions.</p> <p>The signature of the mbean method is Collection getPermissions(GrantedAuthority role).</p> <p>and the code I'm using to call it is </p> <pre><code>Object[] params = {role}; //role is passed in as a GrantedAuthorityImpl (implements GrantedAuthority) String[] signature = {"org.springframework.security.core.authority.GrantedAuthority"}; mbeanServer.invoke(new ObjectName(mbeanName), "getPermissions", params, signature); </code></pre> <p>What could be the issue, or what should I look at?</p> <pre><code>javax.management.RuntimeOperationsException: RuntimeException occurred in RequiredModelMBean while trying to invoke operation getPermissions javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1080) javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955) org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90) org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) org.jboss.mx.modelmbean.RequiredModelMBeanInvoker.invoke(RequiredModelMBeanInvoker.java:127) org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) xxx.MBeanPermissionMapLookup.getPermissions(MBeanPermissionMapLookup.java:31) xxx.MBeanPermissionMapLookup$$FastClassByCGLIB$$667f3fad.invoke(&lt;generated&gt;) ... root cause: java.lang.IllegalArgumentException: argument type mismatch sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244) javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1074) javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955) org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90) org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) org.jboss.mx.modelmbean.RequiredModelMBeanInvoker.invoke(RequiredModelMBeanInvoker.java:127) org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) xxx.MBeanPermissionMapLookup.getPermissions(MBeanPermissionMapLookup.java:31) </code></pre> <p>Using Spring 3.0.4, Spring security 3.0.3, jboss 5.1.0, java jdk 1.6.0-17.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload