Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1708

Error obtaining some MBeanInfo instances via RMIAdaptor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • JBossAS-4.0.3RC2
    • JBossAS-4.0.1 Final, JBossAS-4.0.1 SP1, JBossAS-4.0.2RC1
    • JMX
    • None

      RMIAdaptor.getMBeanInfo(ObjectName) fails for a handful of JBoss MBeans.

      The problem can be demonstrated by acquiring an RMIAdaptor, iterating over all the bean ObjectNames, and attempting to get the MBeanInfo object for each bean. The code below illustrates this:

      final RMIAdaptor rmiAdaptor = (RMIAdaptor)context.lookup("jmx/invoker/RMIAdaptor");
      final Iterator it = rmiAdaptor.queryNames(null, null).iterator();

      while (it.hasNext())
      {
      final ObjectName objectName = (ObjectName)it.next();
      try

      { final MBeanInfo mbeanInfo = rmiAdaptor.getMBeanInfo(objectName); System.out.println("Got MBeanInfo for mbean: " + objectName); }

      catch (Throwable t)

      { System.err.println("Failed to get MBeanInfo for bean named: " + objectName); }

      }

      Below is a list of ObjectNames for the offending MBeans. They are listed in three groupings, according to the type of Exception that was thrown while calling RMIAdaptor.getBeanInfo(). Listed further below are each of the three lengthy stack traces that are produced.

      1)
      jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss:service=proxyFactory,target=ClientUserTransactionFactory
      jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
      jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss:service=Mail
      jboss:service=invoker,type=http,target=Naming,readonly=true
      jboss:service=proxyFactory,target=ClientUserTransaction
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss:service=invoker,type=http,target=Naming
      jboss.mq:service=SecurityManager
      jboss.jca:service=ManagedConnectionFactory,name=JmsXA

      2)
      jboss.web:service=WebServer
      jboss:service=Naming

      3)
      jboss.system:type=Log4jService,service=Logging

      Here are the stack traces for each of the three groups of beans listed above:

      1)
      java.lang.NullPointerException
      at javax.management.modelmbean.DescriptorSupport.readObject(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
      at javax.management.modelmbean.ModelMBeanAttributeInfo.readObject(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readArray(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.rmi.MarshalledObject.get(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
      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:51)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy0.getMBeanInfo(Unknown Source)
      at test.jboss.jmx.rmiadaptor.Client.execute(Client.java:74)
      at test.jboss.jmx.rmiadaptor.Client.main(Client.java:30)

      2)
      java.io.IOException: unknown protocol: resource
      at java.net.URL.readObject(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.util.HashMap.readObject(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.access$300(Unknown Source)
      at java.io.ObjectInputStream$GetFieldImpl.readFields(Unknown Source)
      at java.io.ObjectInputStream.readFields(Unknown Source)
      at javax.management.modelmbean.DescriptorSupport.readObject(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
      at javax.management.modelmbean.ModelMBeanAttributeInfo.readObject(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readArray(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.rmi.MarshalledObject.get(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
      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:51)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy0.getMBeanInfo(Unknown Source)
      at test.jboss.jmx.rmiadaptor.Client.execute(Client.java:74)
      at test.jboss.jmx.rmiadaptor.Client.main(Client.java:30)

      3)
      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.GeneratedMethodAccessor65.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:702)
      at sun.reflect.GeneratedMethodAccessor66.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:289)
      at sun.reflect.GeneratedMethodAccessor67.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:410)
      at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
      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(Unknown Source)
      at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
      at sun.rmi.server.UnicastRef.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
      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:51)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
      at $Proxy0.getMBeanInfo(Unknown Source)
      at test.jboss.jmx.rmiadaptor.Client.execute(Client.java:74)
      at test.jboss.jmx.rmiadaptor.Client.main(Client.java:30)

              dandread1@redhat.com Dimitrios Andreadis
              txtim Tim Golding (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: