LDAP Exception Considerations
Consider the following LDAP exceptions when writing a custom connector. Most exceptions are from the org.apache.directory.shared.ldap.exception package of ApacheDS, but a few exceptions are defined in the CA IAM CS code. All the exceptions extend javax.naming.NamingException, but implement org.apache.directory.shared.ldap.exception.LdapException so a detailed LDAP code can be passed through.
cim1265
Consider the following LDAP exceptions when writing a custom connector. Most exceptions are from the org.apache.directory.shared.ldap.exception package of ApacheDS, but a few exceptions are defined in the CA IAM CS code. All the exceptions extend javax.naming.NamingException, but implement org.apache.directory.shared.ldap.exception.LdapException so a detailed LDAP code can be passed through.
Exceptions are serialized as part of the Service Oriented Architecture. Any exception that is not derived from org.apache.directory.shared.ldap.exception.LdapException or javax.naming.NamingException will be converted to a NamingException before leaving CA IAM CS.
For more information on exceptions, see the Javadoc
CA Identity Manager
bookshelf for either the ApacheDS (included in the SDK installer) or CA IAM CS . For more information on other implementing classes that are not listed, see org.apache.directory.shared.ldap.message.ResultCodeEnum and org.apache.directory.shared.ldap.exception.LdapException,
- LdapNameAlreadyBoundExceptionThrown when an object with the same name as the one you are trying to create on the endpoint system exists.Result code:ResultCodeEnum.ENTRY_ALREADY_EXISTS.
- LdapNameNotFoundExceptionThrown when a DN is received which references an object found not to exist on the endpoint system.Result code: ResultCodeEnum.NOSUCHOBJECT.
- LdapServiceUnavailableExceptionTakes one of the return codes defined in ResultCodeEnum.SERVICEUNAVAILABLE_CODES. Call this exception when you are having communication exceptions with the endpoint system.You can use an instance of this exception to flag transient failures to the CA IAM CS framework by setting the result code of the exception to ResultCodeEnum.UNAVAILABLE. The resiliency support retries the operation which caused the failure.This exception is important for the retry code at higher layers of the system.
- LdapConfigurationExceptionThrown when an error in the configuration of a connector or CA IAM CS is encountered. Try to use more specific exceptions. Avoid using this error code if possible, and provide details of the error in the error message.Result code:ResultCodeEnum.OTHER
- LdapNoPermissionExceptionSpecifies that the requester does not have the right to carry out the requested operation.Result code:ResultCodeEnum.INSUFFICIENTACCESSRIGHTS
- LdapSizeLimitExceededExceptionThrown when the number of results generated by a search exceeds the maximum number of results specified by either the client or the server, after results up to this limit have already been returned. So that handling size limits are not an issue, use sdk.com.ca.jcs.enumeration.RawNamingEnumeration or one of its derived classes.Result code:ResultCodeEnum.SIZELIMITEXCEEDED
- LdapTimeLimitExceededExceptionSeeLdapSizeLimitExceededException.Result code:ResultCodeEnum.TIMELIMITEXCEEDED
- LdapInvalidAttributesExceptionTakes one of the six result codes defined in ResultCodeEnum.ATTRIBUTE_CODES.
- LdapInvalidAttributeValueExceptionThrown when an invalid value is encountered for an attribute, but in many cases correct use of validators and converters removes the need to throw it.Takes one of the following result codes:
- Result code:ResultCodeEnum.CONSTRAINTVIOLATION
- Result code:ResultCodeEnum.INVALIDATTRIBUTESYNTAX
- LdapSchemaViolationExceptionThrown when a request is received which attempts to bypass structural rules dictated by the endpoint system, such as creating an object under an inappropriate container.Takes one of the following result codes:
- Result code:ResultCodeEnum.OBJECTCLASSVIOLATION
- Result code:ResultCodeEnum.NOTALLOWEDONRDN
- Result code:ResultCodeEnum.OBJECTCLASSMODSPROHIBITED.
- LdapNamingExceptionSpecifies a generic exception, to be avoided if at all possible.
- LdapInvalidNameExceptionResult code:Not required