ADMN0022E: Access denied due to insufficient or empty credentials.
While trying to monitor Websphere programmatically via its AdminClient framework, I faced many problems that can be easily solved by reading the documentation carefully. But this one, seems to be quite misleading.
ADMN0022E: Access denied for the getStatsObject operation on Perf MBean due to insufficient or empty credentials.
If you get this error while trying to read PMI data using admin client on websphere, and you are sure about username and password, be sure that the user you are tring to connect has Monitor privileges in the administrative role. You can check it from WAS administrative console > Users and Groups > Administrative User Role and then see if the “Monitor” role is assigned.
Something else that might help, params to connect my WAS 7 instance are (administrative security enabled):
String hostname = "localhost"; String soapport = "8882"; String username = "salem"; String password = "salem"; String truststore = "D:/WAS7/profiles/etc/DummyClientTrustFile.jks"; String keystore = "D:/WAS7/profiles/et/DummyClientKeyFile.jks"; String truststorepass = "WebAS";//default for WAS 7, but for WAS 6.1 it's the node name String keystorepass = "WebAS"; String truststoretype = "jks"; String keystoretype = "jks";
You may start working on Java admin client from here; If you couldn’t figure out using IBM documentation, you may use this…
Just kidding you… will tell you how to do it sooner 🙂