3 Replies Latest reply on May 6, 2005 11:14 AM by Scott Stark

    Twiddle giving StreamCorruptedException: null descriptor? wh

    Corey M. Ellis Newbie

      Hi,

      I have several MBeans running, and when invoking methods using JMX-console, everything is fine. But when invoking the same methods using the twiddle utility I get the following exception. This only happens when using the invoke or info command on my MBeans. When querying or invoking on jboss MBeans twiddle works fine. Can some one tell me what I am doing wrong for twiddle to fail on the invoke or info command. Here is my exception.

      The command I ran

      twiddle.bat invoke "rtbd:name=EventMapper,service=EventMapper" listEventMap

      Again all my invoke commands on any of my MBeans fail. Info commands also fails, but query seems to work fine.

      I have been trying to figure this out for a few days now, and I am deeply in need of some help.

      Thanks in advance


      22:31:49,484 ERROR [Twiddle] Exec failed
      java.io.StreamCorruptedException: Null descriptor?
      at javax.management.modelmbean.DescriptorSupport.readObject(DescriptorSupport.java:673)
      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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.access$300(ObjectInputStream.java:166)
      at java.io.ObjectInputStream$GetFieldImpl.readFields(ObjectInputStream.java:2006)
      at java.io.ObjectInputStream.readFields(ObjectInputStream.java:491)
      at javax.management.modelmbean.ModelMBeanAttributeInfo.readObject(ModelMBeanAttributeInfo.java:278)
      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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      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 org.jboss.console.twiddle.command.InvokeCommand.invoke(InvokeCommand.java:166)
      at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:270)
      at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:288)

        • 1. Re: Twiddle giving StreamCorruptedException: null descriptor
          Dimitris Andreadis Master

          The exception must come from this:

           private void readObject(ObjectInputStream ois)
           throws IOException, ClassNotFoundException
           {
           ObjectInputStream.GetField getField = ois.readFields();
           descriptor = (Descriptor) getField.get("attrDescriptor", null);
           if (descriptor == null)
           throw new StreamCorruptedException("Null descriptor?");
           }
          


          This seems like a serialization issue.

          I haven't looked into the details, but the first think to check is whether you use the exact same jboss libraries in the client and whether the client has access to your own jars.

          • 2. Re: Twiddle giving StreamCorruptedException: null descriptor
            Corey M. Ellis Newbie

            Hi,

            I still am getting the Exception. I am using JBoss 4.0.1sp1 and I checked the twiddle.bat script and its using the client jars that came with this distribution.

            Also, I added to the Twiddle.bat script the location of my own jar files. I copied them to the client directory and added a set command to add it to the classpath variable (see below event-manager.jar is my jar)

            I still get the same exception. Do you have any other ideas?

            Thanks for the quick response.

            rem only include jbossall-client.jar in classpath, if
            rem JBOSS_CLASSPATH was not yet set
            if not "%JBOSS_CLASSPATH%" == "" GOTO HAVE_JB_CP
            set JBOSS_CLASSPATH=%DIRNAME%\..\client\jbossall-client.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\client\getopt.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\client\log4j.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\lib\jboss-jmx.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\lib\xml-apis.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\lib\xercesImpl.jar
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\lib\dom4j.jar

            rem added MSA jars to classpath
            set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%DIRNAME%\..\client\event-manager.jar
            :HAVE_JB_CP

            • 3. Re: Twiddle giving StreamCorruptedException: null descriptor
              Scott Stark Master

              Create a bug report in jira with an example service which illustrates the problem:

              http://jira.jboss.com/jira/browse/JBAS