# Package org.springframework.jdbc

@NonNullApi @NonNullFields package org.springframework.jdbc
The classes in this package make JDBC easier to use and reduce the likelihood of common errors. In particular, they:

- Simplify error handling, avoiding the need for try/catch/finally blocks in application code.
- Present exceptions to application code in a generic hierarchy of unchecked exceptions, enabling applications to catch data access exceptions without being dependent on JDBC, and to ignore fatal exceptions there is no value in catching.
- Allow the implementation of error handling to be modified to target different RDBMSes without introducing proprietary dependencies into application code.

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

Related Packages
Package
Description
org.springframework.jdbc.config
Defines the Spring JDBC configuration namespace.
org.springframework.jdbc.core
Provides the core JDBC framework, based on JdbcTemplate and its associated callback interfaces and helper objects.
org.springframework.jdbc.datasource
Provides a utility class for easy DataSource access, a PlatformTransactionManager for a single DataSource, and various simple DataSource implementations.
org.springframework.jdbc.object
The classes in this package represent RDBMS queries, updates, and stored procedures as threadsafe, reusable objects.
org.springframework.jdbc.support
Support classes for the JDBC framework, used by the classes in the jdbc.core and jdbc.object packages.
Exceptions
Class
Description
BadSqlGrammarException
Exception thrown when SQL specified is invalid.
CannotGetJdbcConnectionException
Fatal exception thrown when we can't connect to an RDBMS using JDBC.
IncorrectResultSetColumnCountException
Data access exception thrown when a result set did not have the correct column count, for example when expecting a single column but getting 0 or more than 1 column.
InvalidResultSetAccessException
Exception thrown when a ResultSet has been accessed in an invalid fashion.
JdbcUpdateAffectedIncorrectNumberOfRowsException
Exception thrown when a JDBC update affects an unexpected number of rows.
LobRetrievalFailureException
Deprecated.
as of 6.2 along with `LobHandler`
SQLWarningException
Exception thrown when we're not ignoring `SQLWarnings`.
UncategorizedSQLException
Exception thrown when we can't classify an SQLException into one of our generic data access exceptions.