Solving problems with Spring's JdbcTemplate