Having configured an HP Diagnostics Java Agent 9.01 probe on a WebSphere 7.x application server to allow JMX metrics information to be accessed, the following error is reported in the WebSphere server log:
[03-02-12 10:21:50:579 CET] FFDC Exception:javax.management.JMRuntimeException SourceId:com.ibm.ws.management.AdminServiceImpl.invoke ProbeId:422 Reporter:com.ibm.ws.management.AdminServiceImpl@49024902
javax.management.JMRuntimeException: ADMN0022E: Access is denied for the getState operation on Server MBean because of insufficient or empty credentials.
at com.ibm.ws.management.AdminServiceImpl.preInvoke(AdminServiceImpl.java:2370)
at com.ibm.ws.management.AdminServiceImpl.preInvoke(AdminServiceImpl.java:2180)
at com.ibm.ws.management.AdminServiceImpl.preInvoke(AdminServiceImpl.java:2080)
at com.ibm.ws.management.AdminServiceImpl.preInvoke(AdminServiceImpl.java:2053)
at com.ibm.ws.management.AdminServiceImpl.getAttribute(AdminServiceImpl.java:852)
at com.ibm.ws.management.PlatformMBeanServer.getAttribute(PlatformMBeanServer.java:673)
at com.mercury.diagnostics.capture.metrics.jmx.WebSphereJMXCollector.isStartupCompleted(WebSphereJMXCollector.java:173)
at com.mercury.diagnostics.capture.metrics.jmx.WebSphereJMXCollector.doInitialize(WebSphereJMXCollector.java:74)
at com.mercury.diagnostics.capture.metrics.jmx.JMXCollector.initialize(JMXCollector.java:141)
at com.mercury.diagnostics.capture.metrics.CollectorControl.initialize(CollectorControl.java:385)
at com.mercury.diagnostics.capture.metrics.CollectorAgent.validateInitialization(CollectorAgent.java:947)
at com.mercury.diagnostics.capture.metrics.CollectorAgent.run(CollectorAgent.java:716)
at java.lang.Thread.run(Thread.java:736)
This error is reported even though the server.policy file has been correctly configured to add entries as follows:
diag permissions
grant codeBase "file:C:/hp/MercuryDiagnostics/JavaAgent/DiagnosticsAgent/lib/probe-jmx.jar" {
permission java.security.AllPermission;
};
diag permissions
grant codeBase "file:C:/hp/MercuryDiagnostics/JavaAgent/DiagnosticsAgent/lib/probe-jmx-was6.jar" {
permission java.security.AllPermission;
};
and also while JMX metrics data is being collected and made available in the HP Diagnostics UI.
This error is reported by the WebSphere 7.x server as the default configuration of the "metrics.config" probe configuration file contains both "WebSphere V5.x Collector" entries and "WebSphere V6.x Collector" entries. The "WebSphere V5.x Collector" entries are not compatible with a WebSphere 7.x servers and result in this error being reported when present.
Note that the "WebSphere V6.x Collector" entries apply the WebSphere V6.x and later releases.
To stop this error being reported by the WebSphere application server, delete all of the "WebSphere V5.x Collector" entries from the "metrics.config" probe configuration file. It may be necessary to restart the WebSphere server for the new probe configuration to take effect.