4 Replies Latest reply on Nov 24, 2014 10:57 AM by samir giradkar

    Facing issue in Twiddle command to get server status

    samir giradkar Newbie

      Hi,

       

      I am getting following exception while running the command 

      sh twiddle.sh -s 10.190.20.247  get "jboss.system:type=Server"

       

      The OS version is Windows 2008 (64 bit)

      JBoss 5.1.0.GA

       

      java.io.NotSerializableException: org.jboss.bootstrap.BaseServerConfig

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)

              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

              at java.util.ArrayList.writeObject(ArrayList.java:570)

              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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)

              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)

              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

              at java.rmi.MarshalledObject.<init>(MarshalledObject.java:101)

              at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:426)

              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:662)

              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)

              at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)

              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)

              at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)

              at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)

              at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)

              at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)

              at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)

              at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)

              at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)

              at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)

              at $Proxy0.getAttributes(Unknown Source)

              at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:168)

              at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:306)

       

       

      Thanks in advance for any help on this

        • 1. Re: Facing issue in Twiddle command to get server status
          Jay SenSharma Master

          You have missing  attribute name "Started" at the end of the command So try the following:

           

           

          ./twiddle.sh -s 10.190.20.247 -u admin -p admin  get "jboss.system:type=Server"  Started
          
          Started=true
          
          • 2. Re: Facing issue in Twiddle command to get server status
            samir giradkar Newbie

            Hi Jay,

             

            Thanks for the reply, I executed the command that you shared on my Linux machine. Now its giving me following exception

             

            [root@nqmslinux bin]# ./twiddle.sh -s 10.190.20.247 -u admin -p admin  get "jboss.system:type=Server"  Started

            Exception in thread "main" java.lang.NoClassDefFoundError: org.jboss.console.twiddle.command.MBeanServerCommand

               at java.lang.Class.initializeClass(libgcj.so.7rh)

               at java.lang.Class.initializeClass(libgcj.so.7rh)

               at java.lang.Class.forName(libgcj.so.7rh)

               at org.jboss.console.twiddle.Twiddle.loadCommands(Twiddle.java:374)

               at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:284)

            Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/app/nqms/jboss-5.1.0.GA/bin/twiddle.jar,file:/app/nqms/jboss-5.1.0.GA/client/jbossall-client.jar,file:/app/nqms/jboss-5.1.0.GA/client/getopt.jar,file:/app/nqms/jboss-5.1.0.GA/client/log4j.jar,file:/app/nqms/jboss-5.1.0.GA/lib/jboss-jmx.jar,file:/app/nqms/jboss-5.1.0.GA/lib/dom4j.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}

               at java.net.URLClassLoader.findClass(libgcj.so.7rh)

               at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

               at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

               at java.lang.Class.initializeClass(libgcj.so.7rh)

               ...4 more

            • 3. Re: Facing issue in Twiddle command to get server status
              Jay SenSharma Master

              This is strange because the "org.jboss.console.twiddle.command.MBeanServerCommand" class should be present inside the same JAR which contains the "org.jboss.console.twiddle.Twiddle" (main class of twiddle). And that jar is $JBOSS_HOME/bin/twiddle.jar

               

              Can you check the JAR if it is modified ?

               

              Also let us know which JDK/JRE you have placed inside your PATH?   Because the javax.management.ObjectName should come from $JAVA_HOME/jre/lib/rt.jar   and should be available by default. For JBoss AS5 you should be either using JDK1.5 or JDK 1.6

              • 4. Re: Facing issue in Twiddle command to get server status
                samir giradkar Newbie

                Hi Jay,

                I did not set JAVA_HOME before running the command. Its working now after JAVA_HOME is set.

                Thanks for your help on this

                 

                Regards,

                Samir