java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.naming.NamingException
javax.naming.NamingSecurityException
javax.naming.AuthenticationException
- 所有已实现的接口:
Serializable
当访问命名或目录服务时发生身份验证错误时抛出此异常。身份验证错误可能会发生,例如,当用户程序提供的凭据无效或无法通过命名/目录服务对用户进行身份验证时。
如果程序想要特别处理这个异常,它应该在尝试捕获 NamingException 之前显式地捕获 AuthenticationException。捕获 AuthenticationException 后,程序可以通过使用适当的凭据更新已解析上下文的环境属性来重新尝试身份验证。
适用于 NamingException 的同步和序列化问题直接适用于此处。
- 自从:
- 1.3
- 参见:
-
字段摘要
在类 javax.naming.NamingException 中声明的字段
remainingName, resolvedName, resolvedObj, rootException -
构造方法总结
构造方法构造方法描述构造 AuthenticationException 的新实例。AuthenticationException(String explanation) 使用提供的解释构造 AuthenticationException 的新实例。 -
方法总结
在类 javax.naming.NamingException 中声明的方法
appendRemainingComponent, appendRemainingName, getCause, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString在类 java.lang.Throwable 中声明的方法
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
构造方法详细信息
-
AuthenticationException
使用提供的解释构造 AuthenticationException 的新实例。所有其他字段默认为空。- 参数:
explanation- 一个可能为空的字符串,其中包含有关此异常的其他详细信息。- 参见:
-
AuthenticationException
public AuthenticationException()构造 AuthenticationException 的新实例。所有字段都设置为空。
-