Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » dao » [javadoc | source]
org.springframework.dao
abstract public class: DataAccessException [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.lang.RuntimeException
            org.springframework.core.NestedRuntimeException
               org.springframework.dao.DataAccessException

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    ObjectRetrievalFailureException, OptimisticLockingFailureException, DataIntegrityViolationException, DeadlockLoserDataAccessException, CannotSerializeTransactionException, TypeMismatchDataAccessException, JdoObjectRetrievalFailureException, JdoSystemException, UncategorizedDataAccessException, DataSourceLookupFailureException, CannotGetCciConnectionException, NonTransientDataAccessException, HibernateObjectRetrievalFailureException, InvalidResultSetAccessException, CannotAcquireLockException, HibernateSystemException, TopLinkOptimisticLockingFailureException, HibernateOptimisticLockingFailureException, CleanupFailureDataAccessException, TopLinkQueryException, IncorrectUpdateSemanticsDataAccessException, SqlXmlFeatureNotImplementedException, RecoverableDataAccessException, IncorrectResultSizeDataAccessException, LobRetrievalFailureException, UncategorizedSQLException, PermissionDeniedDataAccessException, JpaOptimisticLockingFailureException, IncorrectResultSetColumnCountException, NonTransientDataAccessResourceException, HibernateOptimisticLockingFailureException, HibernateQueryException, HibernateSystemException, OjbOperationException, BadSqlGrammarException, HibernateJdbcException, JpaSystemException, HibernateJdbcException, InvalidDataAccessResourceUsageException, TransientDataAccessException, DataRetrievalFailureException, CciOperationNotSupportedException, CannotGetJdbcConnectionException, TransientDataAccessResourceException, RecordTypeNotSupportedException, TopLinkJdbcException, JpaObjectRetrievalFailureException, JdoResourceFailureException, HibernateObjectRetrievalFailureException, InvalidDataAccessApiUsageException, TopLinkSystemException, CannotCreateRecordException, PessimisticLockingFailureException, InvalidResultSetAccessException, JdoOptimisticLockingFailureException, ObjectOptimisticLockingFailureException, JdoUsageException, JdbcUpdateAffectedIncorrectNumberOfRowsException, EmptyResultDataAccessException, SQLWarningException, ConcurrencyFailureException, DataAccessResourceFailureException, HibernateQueryException

Root of the hierarchy of data access exceptions discussed in Expert One-On-One J2EE Design and Development. Please see Chapter 9 of this book for detailed discussion of the motivation for this package.

This exception hierarchy aims to let user code find and handle the kind of error encountered without knowing the details of the particular data access API in use (e.g. JDBC). Thus it is possible to react to an optimistic locking failure without knowing that JDBC is being used.

As this class is a runtime exception, there is no need for user code to catch it or subclasses if any error is to be considered fatal (the usual case).

Constructor:
 public DataAccessException(String msg) 
    Constructor for DataAccessException.
    Parameters:
    msg - the detail message
 public DataAccessException(String msg,
    Throwable cause) 
    Constructor for DataAccessException.
    Parameters:
    msg - the detail message
    cause - the root cause (usually from using a underlying data access API such as JDBC)
Methods from org.springframework.core.NestedRuntimeException:
contains,   getMessage,   getMostSpecificCause,   getRootCause
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait