1 Reply Latest reply on Jan 26, 2009 6:24 PM by Peter Johnson

    twiddle can't get some objects?

    KC Braunschweig Newbie

      This seems like it should be simple but I can't find any helpful info online about it. I have a jboss server running and I'm trying to use twiddle to get info about various objects that are visible in the JMX console. Some return data as expected, while others give an error. Specifically these cases:

      twiddle.sh -s localhost info jboss.system:type=Server
      twiddle.sh -s localhost get jboss.system:type=Server

      Both of the above return as expected. No errors.

      twiddle.sh -s localhost info jboss:service=Naming

      The above info command also returns a list w/ the description, attributes and operations as expected.

      twiddle.sh -s localhost get jboss:service=Naming

      However this time trying to get that object fail as above fails like this:

      12:49:21,579 ERROR [Twiddle] Exec failed
      java.io.NotSerializableException: java.lang.reflect.Method
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)

      I've seen errors like this in other posts, but in those cases it looks like that first line after "Exec failed" usually has some useful information about why. Maybe I'm missing the meaning? Can I not get this object? How do I know if I can or not? I assume I should be able to since the JMX console can?

      Can you help a n00b?



        • 1. Re: twiddle can't get some objects?
          Peter Johnson Master

          The jmx console runs within the app server, so it could be that the java.lang.reflect.Method objects do not have to be serialized. On the other hand, twiddle runs in a separate JVM, thus all objects returned must be serialized.

          One possible workaround is to get only the property values you need, and not the ones you don't need, such as MethodMap in this case.