-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Although the javax.management.modelmbean.DescriptorSupport does attempt to validate whether its fields are Serializable, it does not validate all of the values references. This causes failures when accessing mbeans over rmi as shown in this twiddle example:
[starksm@banshee9100 bin]$ twiddle.sh -s lamia:1099 invoke "jboss.web:service=WebServer" stopConnectors
21:49:02,437 ERROR [Twiddle] Exec failed
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getMBeanInfo(Unknown Source)
at org.jboss.console.twiddle.command.InvokeCommand.invoke(InvokeCommand.java:173)
at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:277)
at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:288)
Caused by: java.io.NotSerializableException: org.jboss.mx.util.MBeanProxyExt
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at java.util.HashMap.writeObject(HashMap.java:978)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.access$100(ObjectOutputStream.java:122)
at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1475)
at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:405)
at javax.management.modelmbean.DescriptorSupport.writeObject(DescriptorSupport.java:559)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.access$100(ObjectOutputStream.java:122)
at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1475)
at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:405)
at javax.management.modelmbean.ModelMBeanAttributeInfo.writeObject(ModelMBeanAttributeInfo.java:312)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:60)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
... 4 more