spring jdbcTemplate wie catch exception?

Alles ist Brillant, bis ich die Begegnung Ort, wo ich wirklich brauchen, um catch-Ausnahme. Wenn ich

jdbcTemplate.query(something...)

in

try{}

block, den ich bekommen:

 Unreachable catch block for SQLException. This exception is never thrown from the try statement body. 

Was kann ich tun in dieser situation?

try{
    personIdReturnedByDb = jdbcTemplate.queryForInt(sql, p.getEmail(),
            p.getName(), p.getSurname(), encPw, dateSql);
}

catch(SQLException sa){


}

Danke,

InformationsquelleAutor Aubergine | 2012-01-18

Schreibe einen Kommentar