On Saturday, July 18, 2009 at 1:14:58 AM UTC+5:30,
cka...@bmc.com wrote:
> I wrote a Websphere application (using AdminClient) to retrieve the applications deployed in several WAS. The code works for discovering some webspheres' applications, however I encountered the following error when querying one of my Websphere 6.1 (use queryConfigObjects):
>
> WSException ADMN0022E: Access is denied for the queryConfigObjects operation on ConfigService MBean because of insufficient or empty credentials.
>
> Here is part of the code:
>
> ..... create admin_client using the AdminClientFactory.....
> // Create a config service proxy object
> com.ibm.websphere.management.configservice.ConfigService config_service = new com.ibm.websphere.management.configservice.ConfigServiceProxy( admin_client);
> // Create a session
> com.ibm.websphere.management.Session session = new com.ibm.websphere.management.Session();
> // Retrieve the cells object name
> javax.management.ObjectName cell_pattern = com.ibm.websphere.management.configservice.ConfigServiceHelper.createObjectName( null, "Cell");
> javax.management.ObjectName cell_object_name = config_service.queryConfigObjects( session, null, cell_pattern, null) [0];
>
> I checked my credential and certificate and they are all corrects, I am really puzzled why the same code works when querying 5 other WAS, but not on one. If any of you have encountered the same problem, please let me know if you find any solution.
>
> Thanks,
> Carolina
Hi
This exception has several causes.
1. WasUserid or WasPassword can be wrong
2. Extra spaces after WasUserid or WasPassword
3. WasRemoteHostName is not set to the right server
4 WasSoapPort is not the right port for the server
5. Special characters in password (ConfigEngine is further restricted vs WAS/Portal)
note: If the above are correct, security configuration may be incorrect in the WasRemoteHostName server.
Resolving the problem
General steps to take to ensure that Portal is configured correctly:
1. Check that the WasUserid and WasPassword values are correct in the wkplc.properties file. Are you able to log into the WAS Admin console using these values?
2. Check that there are no extra spaces after the values.
3. Ensure the WasRemoteHostName is using the full host name in the wkplc.properties file. The DMGR's host name will be required when setting up a cluster.
4. Ensure the WasSoapPort is set to the correct port in the wkplc.properties file. In a cluster, this would be the DMGR's soap port.
5. If you are able to login to the WAS Admin Console using the current values but the configEngine task continues to fail, review the WasPassword to ensure that supported characters are being used. '$' and '!' have been confirmed problem characters.
Thanks
Gautam