Spring provides its own exception hierarchy, which sits on the exception hierarchies of the O/R mapping tools it supports. It catches any database exception or error that might be thrown through JDBC, or the underlying O/R mapping tool, and translates the caught exception to a corresponding exception in its own hierarchy. The Spring exception hierarchy is defined as a subclass of
org.springframework.dao.DataAccessException. Spring catches any exception thrown in the underlying persistence technology and wraps it in a
DataAccessException instance. The
DataAccessException object is an unchecked exception, because it extends
RuntimeException and you do not need to catch it if you do not want to.