LookupAMPrincipalCommand failed, Expected: IMSGUID, got class com.rsa.ims.common.DNGUID for RSA Authentication Manager Admin API
Originally Published: 2015-02-09
Article Number
Applies To
RSA Product/Service Type: Authentication Manager Admin API
RSA Version/Condition: 8.x
Issue
LookupAMPrincipalCommand failed: COMMAND_EXECUTION_UNEXPECTED_ERROR
Caused by: com.rsa.common.UnexpectedDataStoreException:
failed to lookup domain object of class:class com.rsa.authmgr.internal.admin.principalmgt.dal.AMPrincipal by
GUID:CN=userid,CN=Users,DC=org,DC=com
Caused by: org.springframework.orm.hibernate3.HibernateSystemException:
Provided id of the wrong type. Expected: class com.rsa.ims.common.IMSGUID, got class com.rsa.ims.common.DNGUID;
nested exception is org.hibernate.TypeMismatchException: Provided id of the wrong type.
Expected: class com.rsa.ims.common.IMSGUID, got class com.rsa.ims.common.DNGUID
Caused by: org.hibernate.TypeMismatchException: Provided id of the wrong type.
Expected: class com.rsa.ims.common.IMSGUID, got class com.rsa.ims.common.DNGUIDCause
LDAP users need to be registered first with the RegisterPrincipalsCommand before they can be looked up with the LookupAMPrincipalCommand().
Resolution
principal.setWindowsPassword("Password123!"); removed from this sample code, not needed.
Workaround
...
PrincipalDTO user = lookupUser("Andele"); //unregistered LDAP user
System.out.println("unregistered GUID is " + user.getGuid());
register LDAP user
RegisterPrincipalsCommand register = new RegisterPrincipalsCommand();
register.setPrincipalGuids(new String [] {user.getGuid()});
register.execute();
//now should see ims GUID
user = lookupUser("Andele");
System.out.println("GUID after registering is " + user.getGuid());
//now create AMPrincipal object
AMPrincipalDTO principal = new AMPrincipalDTO();
principal.setGuid(user.getGuid());
principal.setBadPasscodes(3);
principal.setDefaultShell("/bin/sh");
principal.setDefaultUserIdShellAllowed(true);
//principal.setStaticPassword("12345678");
//principal.setStaticPasswordSet(true);
AddAMPrincipalCommand cmd = new AddAMPrincipalCommand(principal);
cmd.execute();
//must register and execute AddAMPrincipalCommand
LookupAMPrincipalCommand amp = new LookupAMPrincipalCommand();
amp.setGuid(user.getGuid());
amp.execute();Notes
...
PrincipalDTO user = lookupUser("Andele"); //unregistered LDAP user
System.out.println("unregistered GUID is " + user.getGuid());
register LDAP user
RegisterPrincipalsCommand register = new RegisterPrincipalsCommand();
register.setPrincipalGuids(new String [] {user.getGuid()});
register.execute();
//now should see ims GUID
user = lookupUser("Andele");
System.out.println("GUID after registering is " + user.getGuid());
//now create AMPrincipal object
AMPrincipalDTO principal = new AMPrincipalDTO();
principal.setGuid(user.getGuid());
principal.setBadPasscodes(3);
principal.setDefaultShell("/bin/sh");
principal.setDefaultUserIdShellAllowed(true);
//principal.setStaticPassword("12345678");
//principal.setStaticPasswordSet(true);
AddAMPrincipalCommand cmd = new AddAMPrincipalCommand(principal);
cmd.execute();
//must register and execute AddAMPrincipalCommand
LookupAMPrincipalCommand amp = new LookupAMPrincipalCommand();
amp.setGuid(user.getGuid());
amp.execute();Related Articles
Authentication Manager 8.6 patch 3 System Activity Monitor displaying warning "system.com.rsa.ims.license.impl.LicenseServ… 148Number of Views java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got NCLOB in RSA Identity Governance & Lif… 101Number of Views Error "com.rsa.ims.security.keymanager.sys.MissingSystemKeysException: System fingerprint encrypted key is missing" on RS… 221Number of Views log4j:WARN No appenders could be found for logger (trace.com.rsa.ims.security.crypto.config.CryptoConfiguration). Log4J;Wa… 46Number of Views Migration to RSA Authentication Manager 8.1 with the option to retain system settings fails with an error about duplicate … 137Number of Views
Trending Articles
Passwordless Authentication in Windows MFA Agent for Active Directory – Quick Setup Guide RSA Authentication Manager 8.9 Release Notes (January 2026) RSA Authentication Manager Upgrade Process RSA Authentication Manager 8.7 SP2 Setup and Configuration Guide An example of SSO using SAML and ADFS with RSA Identity Management and Governance 6.9.x
Don't see what you're looking for?