Code example for SQLException

Methods: getMessagegetSQLState

0
            pstmt.setInt(1, eit.getEmployeeId());
            pstmt.execute();
            dbConn.commit();
        } catch (SQLException e) {
            BasicFault bf = new BasicFault();
            String errorMsg = "SQLState: " + e.getSQLState() + "; Message: "
                    + e.getMessage();
            bf.setErrorDetails(errorMsg);
            throw new DataProcessingFault( 
                    "Error while trying to delete employee record", bf);
        } 
        return null; 
    } 
 
    static XMLGregorianCalendar sqlDateToXMLCal(java.sql.Date sqlDate) {
        java.util.Date jDate = new java.util.Date(sqlDate.getTime());
        GregorianCalendar calendar = new GregorianCalendar();
        calendar.setTime(jDate);
        return df.newXMLGregorianCalendar(calendar);
    } 
Contextual code suggestions in your IDE  Get Codota for Java