com.ibm.websphere.naming

Class CannotInstantiateObjectException

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended byjavax.naming.NamingException
  5. extended bycom.ibm.websphere.naming.WebSphereNamingException
  6. extended bycom.ibm.websphere.naming.CannotInstantiateObjectException
All implemented interfaces:
java.io.Serializable

  1. public class CannotInstantiateObjectException
  2. extends WebSphereNamingException
This exception is thrown by WebSphere JNDI Context implementations when a serialized object either cannot be deserialized, or when the deserialized object is a javax.naming.Reference and the JNDI Naming Manager cannot successfully process it. This type of exception may occur during a lookup, or while iterating through a NamingEnumeration returned from a Context.listBindings() call.

This exception encapsulates a NameClassPair instance for the failing object as additional debug information for clients.

See Also:
Serialized Form

Field Summary

Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException

Constructor Summary

Constructor and Description
CannotInstantiateObjectException(java.lang.String msg)
This constructor is used to instantiate an exception of this type when a NameClassPair instance is not available.
CannotInstantiateObjectException(java.lang.String msg,javax.naming.NameClassPair nameClassPair)
This constructor is used to instantiate an exception of this type when a NameClassPair instance is available.
CannotInstantiateObjectException(java.lang.String msg,javax.naming.NameClassPair nameClassPair,javax.naming.Reference referenceObject)
This constructor is used to instantiate an exception of this type when a NameClassPair instance and a javax.naming.Reference are available.

Method Summary

Modifier and Type Method and Description
  1. javax.naming.NameClassPair
getNameClassPair()
This method gets the NameClassPair for the failing serialized object.
  1. javax.naming.Reference
getReference()
This method gets the javax.naming.Reference associated with this exception if this exception was the result of a factory call on the Reference.
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getCause, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CannotInstantiateObjectException

  1. public CannotInstantiateObjectException( java.lang.String msg)
This constructor is used to instantiate an exception of this type when a NameClassPair instance is not available.

CannotInstantiateObjectException

  1. public CannotInstantiateObjectException( java.lang.String msg,
  2. javax.naming.NameClassPair nameClassPair)
This constructor is used to instantiate an exception of this type when a NameClassPair instance is available.

CannotInstantiateObjectException

  1. public CannotInstantiateObjectException( java.lang.String msg,
  2. javax.naming.NameClassPair nameClassPair,
  3. javax.naming.Reference referenceObject)
This constructor is used to instantiate an exception of this type when a NameClassPair instance and a javax.naming.Reference are available. A javax.naming.Reference object may be available if this exception is the result of a failed call on the factory associated with the Reference.

Method Detail

getNameClassPair

  1. public javax.naming.NameClassPair getNameClassPair( )
This method gets the NameClassPair for the failing serialized object.

getReference

  1. public javax.naming.Reference getReference( )
This method gets the javax.naming.Reference associated with this exception if this exception was the result of a factory call on the Reference.