On Feb 21, 1:12 pm, wrote:
> Hi,
> I am new toJMXandWebSphereApplication Server 6.1.
> I am trying to get 'heapSize' attribute from 'JVM' MBean by using the Sample program given at following link:http://publib.boulder.ibm.com/infoce...ndex.jsp?topic...
>
> Following are the jar files in my classpath:
> 1)com.ibm.ws.admin.client_6.1.0.jar
> 2)com.ibm.ws.webservices.thinclient_6.1.0.jar
> 3)ibmorb.jar
> 4)management.jar
> 5)pmij2ee.jar
>
> I was able to create a connection with the Application Server and then Query for the JVM MBean as well. But while calling the getAttribute method for the JVM MBean as shown below:
> mbsc.getAttribute(mbean,"heapSize");
>
> I received following error on above line:
> javax.management.JMRuntimeException:
> >> SERVER (id=4773e3aa, host=01hw107573) TRACE START:
> >> javax.management.JMRuntimeException: ADMN0022E: Access is denied for the getStats operation on JVM MBean because of insufficient or empty credentials.
> >> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:2119)
> >> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1766)
> >> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1694)
> >> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1667)
> >> at com.ibm.ws.management.AdminServiceImpl.getAttribut e(AdminServiceImpl.java:661)
> >> at com.ibm.ws.management.remote.AdminServiceForwarder .getAttribute(AdminServiceForwarder.java:135)
> >> at javax.management.remote.rmi.RMIConnectionImpl.doOp eration(RMIConnectionImpl.java:1400)
> >> at javax.management.remote.rmi.RMIConnectionImpl.acce ss$100(RMIConnectionImpl.java:96)
> >> at javax.management.remote.rmi.RMIConnectionImpl$Priv ilegedOperation.run(RMIConnectionImpl.java:1260)
> >> at javax.management.remote.rmi.RMIConnectionImpl.doPr ivilegedOperation(RMIConnectionImpl.java:1356)
> >> at javax.management.remote.rmi.RMIConnectionImpl.getA ttribute(RMIConnectionImpl.java:612)
> >> at javax.management.remote.rmi._RMIConnectionImpl_Tie .getAttribute(_RMIConnectionImpl_Tie.java:576)
> >> at javax.management.remote.rmi._RMIConnectionImpl_Tie ._invoke(_RMIConnectionImpl_Tie.java:97)
> >> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
> >> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
> >> at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
> >> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
> >> at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
> >> at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
> >> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
> >> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
> >> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)
> >> SERVER (id=4773e3aa, host=01hw107573) TRACE END.

>
> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:2119)
> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1766)
> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1694)
> at com.ibm.ws.management.AdminServiceImpl.preInvoke(A dminServiceImpl.java:1667)
> at com.ibm.ws.management.AdminServiceImpl.getAttribut e(AdminServiceImpl.java:661)
> at com.ibm.ws.management.remote.AdminServiceForwarder .getAttribute(AdminServiceForwarder.java:135)
> at javax.management.remote.rmi.RMIConnectionImpl.doOp eration(RMIConnectionImpl.java:1400)
> at javax.management.remote.rmi.RMIConnectionImpl.acce ss$100(RMIConnectionImpl.java:96)
> at javax.management.remote.rmi.RMIConnectionImpl$Priv ilegedOperation.run(RMIConnectionImpl.java:1260)
> at javax.management.remote.rmi.RMIConnectionImpl.doPr ivilegedOperation(RMIConnectionImpl.java:1356)
> at javax.management.remote.rmi.RMIConnectionImpl.getA ttribute(RMIConnectionImpl.java:612)
> at javax.management.remote.rmi._RMIConnectionImpl_Tie .getAttribute(_RMIConnectionImpl_Tie.java:576)
> at javax.management.remote.rmi._RMIConnectionImpl_Tie ._invoke(_RMIConnectionImpl_Tie.java:97)
> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHa ndler(ServerDelegate.java:613)
> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerD elegate.java:466)
> at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
> at com.ibm.rmi.iiop.Connection.respondTo(Connection.j ava:2673)
> at com.ibm.rmi.iiop.Connection.doWork(Connection.java :2551)
> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl. java:62)
> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.ja va:95)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)
>
> I have given the proper username and password in the HashTable as mentioned in the sample example.
> Can any one please help me with that.


Hi reetesh.....,

Hi....

I also want to use the standard JMX Remoting API (Jsr 160) to connect
to the jmx server.
I m running sample code which u r running from below IBM link..
http://publib.boulder.ibm.com/infoce...va_jsr160.html

But when I m trying to connect it throws following exceptions...
java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.NameNotFoun
dException: Context: manoriDCNode01Cell/nodes/manoriDCNode01/servers/
server1, na
me: JMXConnector: First component in name JMXConnector not found.
[Root exceptio
n is org.omg.CosNaming.NamingContextPackage.NotFound: IDLmg.org/
CosNaming/Nami
ngContext/NotFound:1.0]

Then I copied adminclient.jar and ibmorb.jar and orb.properties file
to classpath from websphere installtion and it worked well for me..

but thats not standard way bcoz...i guess its using websphere classes
and interfaces.......


Can u tell me wat it means by standard way of connecting to jmx
server....?

Any help greatly appreciated..

Thanks,
Nihil