文档

Java™教程
隐藏目录
LDAP错误代码与JNDI异常的映射
导航:Java命名和目录接口
课程:LDAP用户的高级主题
章节:作为LDAP API的JNDI

LDAP错误代码与JNDI异常的映射

LDAP定义了一组与LDAP服务器发送的LDAP响应一起返回的状态码(参见RFC 2251)。在JNDI中,错误条件被表示为NamingException的子类的检查异常。请参阅Naming Exceptions部分,了解JNDI异常类的概述。

LDAP服务提供程序将从LDAP服务器接收到的LDAP状态码转换为适当的NamingException子类。以下表格显示了LDAP状态码和JNDI异常之间的映射关系。

NamingExceptionCommunicationExceptionTimeLimitExceededExceptionSizeLimitExceededExceptionDirContext.search()DirContext.search()AuthenticationNotSupportedExceptionAuthenticationNotSupportedException"java.naming.referral""ignore"PartialResultException"java.naming.referral""ignore""throw"ReferralException"follow""java.naming.ldap.referral.limit"LimitExceededExceptionLimitExceededExceptionOperationNotSupportedExceptionAuthenticationNotSupportedExceptionNoSuchAttributeExceptionInvalidAttributeIdentifierExceptionInvalidSearchFilterExceptionInvalidAttributeValueExceptionAttributeInUseExceptionInvalidAttributeValueExceptionNameNotFoundExceptionNamingExceptionInvalidNameExceptionNamingExceptionAuthenticationNotSupportedExceptionAuthenticationExceptionNoPermissionExceptionServiceUnavailableExceptionServiceUnavailableExceptionOperationNotSupportedExceptionNamingExceptionInvalidNameExceptionSchemaViolationExceptionContextNotEmptyExceptionSchemaViolationExceptionNameAlreadyBoundExceptionSchemaViolationExceptionNamingExceptionNamingException

上一页: LDAP操作映射到JNDI API
下一页: 安全性