Package org.springframework.dao

Exception hierarchy enabling sophisticated error handling independent of the data access approach in use.

See
          Description

Class Diagram Summary
dao 
 

Class Summary
CleanupFailureDataAccessExceptionException thrown when we couldn't cleanup after a data access operation, but the actual operation went OK.
DataAccessExceptionRoot of the hierarchy of data access exceptions discussed in Expert One-On-One J2EE Design and Development.
DataAccessResourceFailureExceptionData access exception thrown when a resource fails completely: for example, if we can't connect to a database using JDBC.
DataIntegrityViolationExceptionException thrown when an attempt to insert or update data results in violation of an integrity constraint.
DataRetrievalFailureExceptionException thrown if certain expected data could not be retrieved, e.g.
DeadlockLoserDataAccessExceptionGeneric exception thrown when the current process was a deadlock loser, and its transaction rolled back.
IncorrectUpdateSemanticsDataAccessExceptionData access exception thrown when something unintended appears to have happened with an update, but the transaction hasn't already been rolled back.
InvalidDataAccessApiUsageExceptionException thrown on incorrect usage of the API, such as failing to "compile" a query object that needed compilation before execution.
InvalidDataAccessResourceUsageExceptionRoot for exceptions thrown when we use a data access resource incorrectly.
OptimisticLockingFailureExceptionException thrown on an optimistic locking violation.
TypeMismatchDataAccessExceptionException thrown on mismatch between Java type and database type: for example on an attempt to set an object of the wrong type in an RDBMS column.
UncategorizedDataAccessExceptionNormal superclass when we can't distinguish anything more specific than "something went wrong with the underlying resource": for example, a SQLException from JDBC we can't pinpoint more precisely.
 

Package org.springframework.dao Description

Exception hierarchy enabling sophisticated error handling independent of the data access approach in use. For example, when DAOs and data access frameworks use the exceptions in this package (and custom subclasses), calling code can detect and handle common problems such as deadlocks without being tied to a particular data access strategy, such as JDBC.

All these exceptions are unchecked, meaning that calling code can leave them uncaught and treat all data access exceptions as fatal.

The classes in this package are discussed in Chapter 9 of Expert One-On-One J2EE Design and Development by Rod Johnson (Wrox, 2002).