-
1. Re: twiddle get command will not display some MBean attributes
saltnlight5 May 27, 2010 7:56 AM (in response to saltnlight5)Can anyone provide some feedback here?
-
2. Re: twiddle get command will not display some MBean attributes
jaikiran May 27, 2010 8:54 AM (in response to saltnlight5)Zemian Deng wrote:
I also notice if I do a get query of MBean that doesn't exist, it will not error, but silently returned with nothing. I rather it throws an error telling me the MBean doesn't exist. For example:
## get some fake mbean (run with out error!) $ bin/twiddle.sh get someFakeDomain:foo=bar
Which version of JBoss AS are you using? And are you sure, no one changed the twiddle script? I just tried this on JBoss AS 5.1.0 and get an error (as expected):
[jpai@localhost bin]$ ./twiddle.sh get someFakeDomain:foo=bar 18:22:52,196 ERROR [Twiddle] Exec failed javax.management.InstanceNotFoundException: someFakeDomain:foo=bar is not registered. at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526) at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675) 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:597) at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:263) 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:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138) at org.jboss.mx.server.Invocation.invoke(Invocation.java:90) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140) at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74) at org.jboss.mx.server.Invocation.invoke(Invocation.java:90) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180) 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:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422) 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:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
-
3. Re: twiddle get command will not display some MBean attributes
jaikiran May 27, 2010 8:57 AM (in response to jaikiran)Also, the rest of the MBeans which you say don't return any result, fail (as expected) on my system.
-
4. Re: twiddle get command will not display some MBean attributes
saltnlight5 May 27, 2010 1:22 PM (in response to jaikiran)Ahh crap, it is my installation. Not sure what/how it got changed it, but when I unzip a new JBoss5 installation, it started to work as expected, which prints out those exception stack.
$ bin/twiddle.sh get jboss.messaging.destination:service=Queue,name=DLQ MessageCounter 13:17:25,137 ERROR [Twiddle] Exec failed java.io.NotSerializableException: org.jboss.jms.server.messagecounter.MessageCounter$DayCounter at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.ArrayList.writeObject(ArrayList.java:570) ...
Now to understand the error, I suppose that jmx-console works because it inside the jboss server VM and doesn't need to come across network, while twiddle is a JMX client that must serialize the bean across and failed?
Thanks for verifying for me jaikiran!
-
5. Re: twiddle get command will not display some MBean attributes
jaikiran Jun 1, 2010 2:09 PM (in response to saltnlight5)Zemian Deng wrote:
That's correct.