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, InvalidAttributeIdentifierException, InvalidAttributesException, InvalidAttributeValueException, InvalidNameException, 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 Details

    • NamingException

      public NamingException(String msg)
      Constructor that takes a message.
      Parameters:
      msg - the detail message
    • NamingException

      public NamingException(String msg, Throwable cause)
      Constructor that allows a message and a root cause.
      Parameters:
      msg - the detail message
      cause - the cause of the exception. This argument is generally expected to be a proper subclass of NamingException.
    • NamingException

      public NamingException(Throwable cause)
      Constructor that allows a plain root cause, intended for subclasses mirroring corresponding javax.naming exceptions.
      Parameters:
      cause - the cause of the exception. This argument is generally expected to be a proper subclass of NamingException.
  • Method Details

    • getCause

      public Throwable getCause()
      Overrides Throwable.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.
      Overrides:
      getCause in class Throwable
    • getExplanation

      public String getExplanation()
      Convenience method to get the explanation associated with this exception, if the root cause was an instance of NamingException.
      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

      public Name getRemainingName()
      Convenience method to get the unresolved part of the name associated with this exception, if the root cause was an instance of NamingException.
      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

      public Name getResolvedName()
      Convenience method to get the leading portion of the resolved name associated with this exception, if the root cause was an instance of NamingException.
      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

      public Object getResolvedObj()
      Convenience method to get the resolved object associated with this exception, if the root cause was an instance of NamingException.
      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