diff --git a/jdbc/src/main/java/org/springframework/jdbc/BadGrammarJdbcException.java b/jdbc/src/main/java/org/springframework/jdbc/BadGrammarJdbcException.java index 4a9f3665f8..e4fa2b5a86 100644 --- a/jdbc/src/main/java/org/springframework/jdbc/BadGrammarJdbcException.java +++ b/jdbc/src/main/java/org/springframework/jdbc/BadGrammarJdbcException.java @@ -2,7 +2,7 @@ import java.sql.SQLException; -public class BadGrammarJdbcException extends RuntimeException { +public class BadGrammarJdbcException extends JdbcException { public BadGrammarJdbcException(String msg) { super(msg); } diff --git a/jdbc/src/main/java/org/springframework/jdbc/CannotGetJdbcConnectionException.java b/jdbc/src/main/java/org/springframework/jdbc/CannotGetJdbcConnectionException.java index c5c3bcd010..3e5949b1fb 100644 --- a/jdbc/src/main/java/org/springframework/jdbc/CannotGetJdbcConnectionException.java +++ b/jdbc/src/main/java/org/springframework/jdbc/CannotGetJdbcConnectionException.java @@ -2,7 +2,7 @@ import java.sql.SQLException; -public class CannotGetJdbcConnectionException extends RuntimeException { +public class CannotGetJdbcConnectionException extends JdbcException { public CannotGetJdbcConnectionException(String msg) { super(msg); diff --git a/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index f83fe278a0..35582a37db 100644 --- a/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -99,7 +99,7 @@ private class SqlExceptionTranslator { "58" // DB2: unexpected system error ); - private RuntimeException translateException(SQLException e) { + private JdbcException translateException(SQLException e) { String sqlState = e.getSQLState(); String classCode = sqlState.substring(0, 2); if (DATA_ACCESS_RESOURCE_FAILURE_CODES.contains(classCode)) {