Top Description Constructors Methods
org.springframework.dao

public abstract Class DataAccessException

extends NestedRuntimeException
Class Inheritance
Known Direct Subclasses
org.springframework.dao.NonTransientDataAccessException, org.springframework.dao.RecoverableDataAccessException, org.springframework.dao.TransientDataAccessException
Annotations
@SuppressWarnings:serial
Imports
org.springframework.core.NestedRuntimeException, org.springframework.lang.Nullable

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).

Author
Rod Johnson

Constructor Summary

AccessConstructor and Description
public
DataAccessException(String
the detail message
msg
)

Constructor for DataAccessException.

public
DataAccessException(String
the detail message
msg
,
Throwable
the root cause (usually from using an underlying data access API such as JDBC)
cause
)

Constructor for DataAccessException.

Method Summary

Inherited from org.springframework.core.NestedRuntimeException:
containsgetMostSpecificCausegetRootCause

Constructor Detail

DataAccessExceptionback to summary
public DataAccessException(String msg)

Constructor for DataAccessException.

Parameters
msg:String

the detail message

DataAccessExceptionback to summary
public DataAccessException(String msg, Throwable cause)

Constructor for DataAccessException.

Parameters
msg:String

the detail message

cause:Throwable

the root cause (usually from using an underlying data access API such as JDBC)