javax.naming
Class NamingException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by javax.naming.NamingException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AttributeInUseException sample code for javax.naming.directory.AttributeInUseException definition code for javax.naming.directory.AttributeInUseException , AttributeModificationException sample code for javax.naming.directory.AttributeModificationException definition code for javax.naming.directory.AttributeModificationException , CannotProceedException sample code for javax.naming.CannotProceedException definition code for javax.naming.CannotProceedException , CommunicationException sample code for javax.naming.CommunicationException definition code for javax.naming.CommunicationException , ConfigurationException sample code for javax.naming.ConfigurationException definition code for javax.naming.ConfigurationException , ContextNotEmptyException sample code for javax.naming.ContextNotEmptyException definition code for javax.naming.ContextNotEmptyException , InsufficientResourcesException sample code for javax.naming.InsufficientResourcesException definition code for javax.naming.InsufficientResourcesException , InterruptedNamingException sample code for javax.naming.InterruptedNamingException definition code for javax.naming.InterruptedNamingException , InvalidAttributeIdentifierException sample code for javax.naming.directory.InvalidAttributeIdentifierException definition code for javax.naming.directory.InvalidAttributeIdentifierException , InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException , InvalidAttributeValueException sample code for javax.naming.directory.InvalidAttributeValueException definition code for javax.naming.directory.InvalidAttributeValueException , InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException , InvalidSearchControlsException sample code for javax.naming.directory.InvalidSearchControlsException definition code for javax.naming.directory.InvalidSearchControlsException , InvalidSearchFilterException sample code for javax.naming.directory.InvalidSearchFilterException definition code for javax.naming.directory.InvalidSearchFilterException , LimitExceededException sample code for javax.naming.LimitExceededException definition code for javax.naming.LimitExceededException , LinkException sample code for javax.naming.LinkException definition code for javax.naming.LinkException , NameAlreadyBoundException sample code for javax.naming.NameAlreadyBoundException definition code for javax.naming.NameAlreadyBoundException , NameNotFoundException sample code for javax.naming.NameNotFoundException definition code for javax.naming.NameNotFoundException , NamingSecurityException sample code for javax.naming.NamingSecurityException definition code for javax.naming.NamingSecurityException , NoInitialContextException sample code for javax.naming.NoInitialContextException definition code for javax.naming.NoInitialContextException , NoSuchAttributeException sample code for javax.naming.directory.NoSuchAttributeException definition code for javax.naming.directory.NoSuchAttributeException , NotContextException sample code for javax.naming.NotContextException definition code for javax.naming.NotContextException , OperationNotSupportedException sample code for javax.naming.OperationNotSupportedException definition code for javax.naming.OperationNotSupportedException , PartialResultException sample code for javax.naming.PartialResultException definition code for javax.naming.PartialResultException , ReferralException sample code for javax.naming.ReferralException definition code for javax.naming.ReferralException , SchemaViolationException sample code for javax.naming.directory.SchemaViolationException definition code for javax.naming.directory.SchemaViolationException , ServiceUnavailableException sample code for javax.naming.ServiceUnavailableException definition code for javax.naming.ServiceUnavailableException

public class NamingException
extends Exception sample code for java.lang.Exception definition code for java.lang.Exception

This is the superclass of all exceptions thrown by operations in the Context and DirContext interfaces. The nature of the failure is described by the name of the subclass. This exception captures the information pinpointing where the operation failed, such as where resolution last proceeded to.

null is an acceptable value for any of these fields. When null, it means that no such information has been recorded for that field.

A NamingException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single NamingException instance should lock the object.

This exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The root exception (or root cause) is the same object as the cause returned by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method.

Since:
1.3
See Also:
Serialized Form

Field Summary
protected  Name sample code for javax.naming.Name definition code for javax.naming.Name remainingName sample code for javax.naming.NamingException.remainingName definition code for javax.naming.NamingException.remainingName
          Contains the remaining name that has not been resolved yet.
protected  Name sample code for javax.naming.Name definition code for javax.naming.Name resolvedName sample code for javax.naming.NamingException.resolvedName definition code for javax.naming.NamingException.resolvedName
          Contains the part of the name that has been successfully resolved.
protected  Object sample code for java.lang.Object definition code for java.lang.Object resolvedObj sample code for javax.naming.NamingException.resolvedObj definition code for javax.naming.NamingException.resolvedObj
          Contains the object to which resolution of the part of the name was successful.
protected  Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable rootException sample code for javax.naming.NamingException.rootException definition code for javax.naming.NamingException.rootException
          Contains the original exception that caused this NamingException to be thrown.
 
Constructor Summary
NamingException sample code for javax.naming.NamingException.NamingException() definition code for javax.naming.NamingException.NamingException() ()
          Constructs a new NamingException.
NamingException sample code for javax.naming.NamingException.NamingException(java.lang.String) definition code for javax.naming.NamingException.NamingException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  explanation)
          Constructs a new NamingException with an explanation.
 
Method Summary
 void appendRemainingComponent sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Add name as the last component in remaining name.
 void appendRemainingName sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Add components from 'name' as the last components in remaining name.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable getCause sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() ()
          Returns the cause of this exception.
 String sample code for java.lang.String definition code for java.lang.String getExplanation sample code for javax.naming.NamingException.getExplanation() definition code for javax.naming.NamingException.getExplanation() ()
          Retrieves the explanation associated with this exception.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getRemainingName sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() ()
          Retrieves the remaining unresolved portion of the name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getResolvedName sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName() ()
          Retrieves the leading portion of the name that was resolved successfully.
 Object sample code for java.lang.Object definition code for java.lang.Object getResolvedObj sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj() ()
          Retrieves the object to which resolution was successful.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable getRootCause sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause() ()
          Retrieves the root cause of this NamingException, if any.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable initCause sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Initializes the cause of this exception to the specified value.
 void setRemainingName sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Sets the remaining name field of this exception.
 void setResolvedName sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Sets the resolved name field of this exception.
 void setResolvedObj sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Sets the resolved object field of this exception.
 void setRootCause sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
          Records the root cause of this NamingException.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.NamingException.toString() definition code for javax.naming.NamingException.toString() ()
          Generates the string representation of this exception.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.NamingException.toString(boolean) definition code for javax.naming.NamingException.toString(boolean) (boolean detail)
          Generates the string representation in more detail.
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

resolvedName sample code for javax.naming.NamingException.resolvedName

protected Name sample code for javax.naming.Name definition code for javax.naming.Name  resolvedName
Contains the part of the name that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.

See Also:
getResolvedName() sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName() , setResolvedName(javax.naming.Name) sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name)

resolvedObj sample code for javax.naming.NamingException.resolvedObj

protected Object sample code for java.lang.Object definition code for java.lang.Object  resolvedObj
Contains the object to which resolution of the part of the name was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.

See Also:
getResolvedObj() sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj() , setResolvedObj(java.lang.Object) sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object)

remainingName sample code for javax.naming.NamingException.remainingName

protected Name sample code for javax.naming.Name definition code for javax.naming.Name  remainingName
Contains the remaining name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get, set, "append" methods.

See Also:
getRemainingName() sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , setRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , appendRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) , appendRemainingComponent(java.lang.String) sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String)

rootException sample code for javax.naming.NamingException.rootException

protected Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  rootException
Contains the original exception that caused this NamingException to be thrown. This field is set if there is additional information that could be obtained from the original exception, or if the original exception could not be mapped to a subclass of NamingException. Can be null.

This field predates the general-purpose exception chaining facility. The initCause(Throwable) sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) and getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() methods are now the preferred means of accessing this information.

See Also:
getRootCause() sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause() , setRootCause(Throwable) sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable) , initCause(Throwable) sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) , getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause()
Constructor Detail

NamingException sample code for javax.naming.NamingException(java.lang.String) definition code for javax.naming.NamingException(java.lang.String)

public NamingException(String sample code for java.lang.String definition code for java.lang.String  explanation)
Constructs a new NamingException with an explanation. All unspecified fields are set to null.

Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()

NamingException sample code for javax.naming.NamingException() definition code for javax.naming.NamingException()

public NamingException()
Constructs a new NamingException. All fields are set to null.

Method Detail

getResolvedName sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName()

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getResolvedName()
Retrieves the leading portion of the name that was resolved successfully.

Returns:
The part of the name that was resolved successfully. It is a composite name. It can be null, which means the resolved name field has not been set.
See Also:
getResolvedObj() sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj() , setResolvedName(javax.naming.Name) sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name)

getRemainingName sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName()

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getRemainingName()
Retrieves the remaining unresolved portion of the name.

Returns:
The part of the name that has not been resolved. It is a composite name. It can be null, which means the remaining name field has not been set.
See Also:
setRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , appendRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) , appendRemainingComponent(java.lang.String) sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String)

getResolvedObj sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj()

public Object sample code for java.lang.Object definition code for java.lang.Object  getResolvedObj()
Retrieves the object to which resolution was successful. This is the object to which the resolved name is bound.

Returns:
The possibly null object that was resolved so far. null means that the resolved object field has not been set.
See Also:
getResolvedName() sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName() , setResolvedObj(java.lang.Object) sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object)

getExplanation sample code for javax.naming.NamingException.getExplanation() definition code for javax.naming.NamingException.getExplanation()

public String sample code for java.lang.String definition code for java.lang.String  getExplanation()
Retrieves the explanation associated with this exception.

Returns:
The possibly null detail string explaining more about this exception. If null, it means there is no detail message for this exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()

setResolvedName sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name)

public void setResolvedName(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
Sets the resolved name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The possibly null name to set resolved name to. If null, it sets the resolved name field to null.
See Also:
getResolvedName() sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName()

setRemainingName sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name)

public void setRemainingName(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
Sets the remaining name field of this exception.

name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.

A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.

Parameters:
name - The possibly null name to set remaining name to. If null, it sets the remaining name field to null.
See Also:
getRemainingName() sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , appendRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) , appendRemainingComponent(java.lang.String) sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String)

setResolvedObj sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object)

public void setResolvedObj(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Sets the resolved object field of this exception.

Parameters:
obj - The possibly null object to set resolved object to. If null, the resolved object field is set to null.
See Also:
getResolvedObj() sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj()

appendRemainingComponent sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String)

public void appendRemainingComponent(String sample code for java.lang.String definition code for java.lang.String  name)
Add name as the last component in remaining name.

Parameters:
name - The component to add. If name is null, this method does not do anything.
See Also:
setRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , getRemainingName() sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , appendRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name)

appendRemainingName sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name)

public void appendRemainingName(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
Add components from 'name' as the last components in remaining name.

name is a composite name. If the intent is to append a compound name, you should "stringify" the compound name then invoke the overloaded form that accepts a String parameter.

Subsequent changes to name does not affect the remaining name field in this NamingException and vice versa.

Parameters:
name - The possibly null name containing ordered components to add. If name is null, this method does not do anything.
See Also:
setRemainingName(javax.naming.Name) sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , getRemainingName() sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , appendRemainingComponent(java.lang.String) sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String)

getRootCause sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause()

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  getRootCause()
Retrieves the root cause of this NamingException, if any. The root cause of a naming exception is used when the service provider wants to indicate to the caller a non-naming related exception but at the same time wants to use the NamingException structure to indicate how far the naming operation proceeded.

This method predates the general-purpose exception chaining facility. The getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() method is now the preferred means of obtaining this information.

Returns:
The possibly null exception that caused this naming exception. If null, it means no root cause has been set for this naming exception.
See Also:
setRootCause(java.lang.Throwable) sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable) , rootException sample code for javax.naming.NamingException.rootException definition code for javax.naming.NamingException.rootException , getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause()

setRootCause sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable)

public void setRootCause(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  e)
Records the root cause of this NamingException. If e is this, this method does not do anything.

This method predates the general-purpose exception chaining facility. The initCause(Throwable) sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) method is now the preferred means of recording this information.

Parameters:
e - The possibly null exception that caused the naming operation to fail. If null, it means this naming exception has no root cause.
See Also:
getRootCause() sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause() , rootException sample code for javax.naming.NamingException.rootException definition code for javax.naming.NamingException.rootException , initCause(java.lang.Throwable) sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable)

getCause sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause()

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  getCause()
Returns the cause of this exception. The cause is the throwable that caused this naming exception to be thrown. Returns null if the cause is nonexistent or unknown.

Overrides:
getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
the cause of this exception, or null if the cause is nonexistent or unknown.
Since:
1.4
See Also:
initCause(Throwable) sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable)

initCause sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable)

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  initCause(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Initializes the cause of this exception to the specified value. The cause is the throwable that caused this naming exception to be thrown.

This method may be called at most once.

Overrides:
initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Parameters:
cause - the cause, which is saved for later retrieval by the getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() method. A null value indicates that the cause is nonexistent or unknown.
Returns:
a reference to this NamingException instance.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if cause is this exception. (A throwable cannot be its own cause.)
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if this method has already been called on this exception.
Since:
1.4
See Also:
getCause() sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause()

toString sample code for javax.naming.NamingException.toString() definition code for javax.naming.NamingException.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Generates the string representation of this exception. The string representation consists of this exception's class name, its detailed message, and if it has a root cause, the string representation of the root cause exception, followed by the remaining name (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.

Overrides:
toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
The non-null string containing the string representation of this exception.

toString sample code for javax.naming.NamingException.toString(boolean) definition code for javax.naming.NamingException.toString(boolean)

public String sample code for java.lang.String definition code for java.lang.String  toString(boolean detail)
Generates the string representation in more detail. This string representation consists of the information returned by the toString() that takes no parameters, plus the string representation of the resolved object (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.

Parameters:
detail - If true, include details about the resolved object in addition to the other information.
Returns:
The non-null string containing the string representation.