4 Replies Latest reply on Oct 27, 2004 5:39 AM by Dilip Padhee

    Attribute Stats can't retrieve

    Dilip Padhee Newbie

      Couldn't retrieve the Attribute of type "javax.management.j2ee.statistics.Stats" . But could able to retrieve other attributes through a Remote Client.

      Could any one help me in retrieving the Stats Attribute.My code is like this.
      MBeanInfo mbInfo = server.getMBeanInfo(MBeanObName);
      MBeanAttributeInfo[] attrInfo = mbInfo.getAttributes();
      for (int jj=0; jj<attrInfo.length; jj++) {
      String attrName = attrInfo[jj].getName();
      String attrType = attrInfo[jj].getType();
      Object value = server.getAttribute(MBeanObName, attrName);
      }catch(Exception e){System.out.println("Error...");


        • 1. Re: Attribute Stats can't retrieve
          Dimitris Andreadis Master

          Yes, but what's the exception you're getting?

          It could also be for that specific MBean to not support statistics

          • 2. Re: Attribute Stats can't retrieve
            Dilip Padhee Newbie


            i tried for all MBeans, But couldn't able to retrieve only the Stats attribute in all MBeans.
            In printStackTrace() showing the following exception.

            at $Proxy0.getAttribute(Unknown Source)
            at GetMBeanStats.main(GetMBeanStats.java:69)
            Caused by: java.lang.ClassNotFoundException: org.jboss.management.j2ee.statistic
            s.ServletStatsImpl (no security manager: RMI class loader disabled)
            at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
            at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
            at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
            at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
            at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
            at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
            at java.io.ObjectInputStream.readClassDesc(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(JRMPInvo
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
            at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientIntercepto
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:5
            at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
            ... 2 more

            • 3. Re: Attribute Stats can't retrieve
              Dimitris Andreadis Master

              You probably need to put 'jboss-mananagent.jar' in your client classpath to get the definition of org.jboss.management.j2ee.statistics.ServletStatsImpl

              This class seems to be missing from jbossall-client.jar.

              Did you use jbossall-client.jar?

              • 4. Re: Attribute Stats can't retrieve
                Dilip Padhee Newbie

                Thanks ,
                Have added jboss-management.jar file in classpath.
                Now i could retrieve the Stats attribute.
                In the remote client am using jbossall-client.jar and jboss-jmx.jar and now this jboss-management.jar file.

                But I am using a swing gui tool called "ejtool" which is only using jbossall-client.jar and jboss-jmx.jar file. (no jboss-management.jar file) ??
                And in a another tool "MC4j" also not using this jboss-management.jar file.??How ?

                I want to know which jar files are needed in my remote client program
                so that i can retrieve all attributes and invoke all operations of MBeans.
                Currently am using JBoss3.2.5.And am using following three jar files

                Again to connect all the version of JBoss (3.x.x to 4.0.0) from my
                client program what other jar files are required ?

                for ex: I found the following files required for diff versions of JBoss.
                jBoss4.0.0 -(dom4j.jar also needed)
                JBoss3.0.4 and jBoss3.0.8 - (log4j-boot.jar also needed)