Package org.springframework.ldap
Class NamingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.ldap.NamingException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AttributeInUseException
,AttributeModificationException
,BadLdapGrammarException
,CannotProceedException
,CommunicationException
,ConfigurationException
,ContextNotEmptyException
,ConverterException
,CreateControlFailedException
,InsufficientResourcesException
,InterruptedNamingException
,InvalidAttributeFormatException
,InvalidAttributeIdentifierException
,InvalidAttributesException
,InvalidAttributeValueException
,InvalidNameException
,InvalidRecordFormatException
,InvalidSearchControlsException
,InvalidSearchFilterException
,LimitExceededException
,LinkException
,NameAlreadyBoundException
,NameNotFoundException
,NamingSecurityException
,NoInitialContextException
,NoSuchAttributeException
,NotContextException
,ObjectRetrievalException
,OdmException
,OperationNotSupportedException
,PartialResultException
,ReferralException
,SchemaViolationException
,ServiceUnavailableException
,UncategorizedLdapException
public abstract class NamingException
extends org.springframework.core.NestedRuntimeException
Base class for exception thrown by the framework whenever it encounters a
problem related to LDAP.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNamingException
(String msg) Constructor that takes a message.NamingException
(String msg, Throwable cause) Constructor that allows a message and a root cause.NamingException
(Throwable cause) Constructor that allows a plain root cause, intended for subclasses mirroring correspondingjavax.naming
exceptions. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
OverridesThrowable.getCause()
since serialization always tries to serialize the base class before the subclass.Convenience method to get the explanation associated with this exception, if the root cause was an instance ofNamingException
.Convenience method to get the unresolved part of the name associated with this exception, if the root cause was an instance ofNamingException
.Convenience method to get the leading portion of the resolved name associated with this exception, if the root cause was an instance ofNamingException
.Convenience method to get the resolved object associated with this exception, if the root cause was an instance ofNamingException
.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NamingException
Constructor that takes a message.- Parameters:
msg
- the detail message
-
NamingException
Constructor that allows a message and a root cause.- Parameters:
msg
- the detail messagecause
- the cause of the exception. This argument is generally expected to be a proper subclass ofNamingException
.
-
NamingException
Constructor that allows a plain root cause, intended for subclasses mirroring correspondingjavax.naming
exceptions.- Parameters:
cause
- the cause of the exception. This argument is generally expected to be a proper subclass ofNamingException
.
-
-
Method Details
-
getCause
OverridesThrowable.getCause()
since serialization always tries to serialize the base class before the subclass. Our cause may have a resolvedObj that is not serializable. By storing the cause in this class, we get a chance at temporarily nulling the cause before serialization, thus in effect making the current instance serializable. -
getExplanation
Convenience method to get the explanation associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a detail string explaining more about this exception if the root
cause is an instance of javax.naming.NamingException, or
null
if there is no detail message for this exception
-
getRemainingName
Convenience method to get the unresolved part of the name associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a composite name describing the part of the name that has not
been resolved if the root cause is an instance of
javax.naming.NamingException, or
null
if the remaining name field has not been set
-
getResolvedName
Convenience method to get the leading portion of the resolved name associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a composite name describing the leading portion of the name
that was resolved successfully if the root cause is an instance
of javax.naming.NamingException, or
null
if the resolved name field has not been set
-
getResolvedObj
Convenience method to get the resolved object associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- the object that was resolved so far if the root cause is an
instance of javax.naming.NamingException, or
null
if the resolved object field has not been set
-