Everything is brilliant until I encounter place where I actually do need to catch exception. When I place
jdbcTemplate.query(something...)
That's because SQLException
, a checked exception, is not thrown by the any of the JdbcTemplate.query(...)
methods (javadoc link). Spring translates this to one of the DataAccessException, which is more generic family of runtime exceptions, in order to abstract away any specific underlying database implementation.