Mapping of LDAP Error Codes to JNDI Exceptions

LDAP Status / Error Code

Exception or Action

Meaning

0 Report success. Success
1 NamingException Operations error
2 CommunicationException Protocol error
3 TimeLimitExceededException Time limit exceeded.
4 SizeLimitExceededException Size limit exceeded.
5 Used by DirContext.search(). Does not generate an exception. Compared false.
6 Used by DirContext.search(). Does not generate an exception. Compared true.
7 AuthenticationNotSupportedException Authentication method not supported.
8 AuthenticationNotSupportedException Strong authentication required.
9 If the environment property “java.naming.referral” is set to “ignore” or the contents of the error do not contain a referral, throw a PartialResultException. Otherwise, use contents to build a referral. Partial results being returned.
10 If the environment property “java.naming.referral” is set to “ignore”, then ignore. If the property is set to”throw”, throw ReferralException. If the property is set to “follow”, then the LDAP provider processes the referral. If the “java.naming.ldap.referral.limit” property has been exceeded, throwLimitExceededException. Referral encountered.
11 LimitExceededException Administrative limit exceeded.
12 OperationNotSupportedException Unavailable critical extension requested.
13 AuthenticationNotSupportedException Confidentiality required.
14 Used internally by the LDAP provider during authentication. SASL bind in progress.
16 NoSuchAttributeException No such attribute exists.
17 InvalidAttributeIdentifierException An undefined attribute type.
18 InvalidSearchFilterException Inappropriate matching
19 InvalidAttributeValueException A constraint violation.
20 AttributeInUseException An attribute or value already in use.
21 InvalidAttributeValueException An invalid attribute syntax.
32 NameNotFoundException No such object exists.
33 NamingException Alias problem
34 InvalidNameException An invalid DN syntax.
35 Used by the LDAP provider; usually doesn’t generate an exception. Is a leaf.
36 NamingException Alias dereferencing problem
48 AuthenticationNotSupportedException Inappropriate authentication
49 AuthenticationException Invalid credentials
50 NoPermissionException Insufficient access rights
51 ServiceUnavailableException Busy
52 ServiceUnavailableException Unavailable
53 OperationNotSupportedException Unwilling to perform
54 NamingException Loop detected.
64 InvalidNameException Naming violation
65 SchemaViolationException Object class violation
66 ContextNotEmptyException Not allowed on non-leaf.
67 SchemaViolationException Not allowed on RDN.
68 NameAlreadyBoundException Entry already exists.
69 SchemaViolationException Object class modifications prohibited.
71 NamingException Affects multiple DSAs.
80 NamingException Other

 

Leave a Reply

Your email address will not be published. Required fields are marked *