Code example for SQLException

Methods: printStackTracegetErrorCode

0
             */ 
            "jdbc:derby:/media/Ext4Data/workspace/blog-samples/updating_databases_with_jaxws/EMPLDB", "APP", "PASSWORD");  
 
            df = DatatypeFactory.newInstance();
        } catch (SQLException e) {
            e.printStackTrace();
            throw new IllegalStateException(
                    "Database connection cannot be made: " + "Code: " 
                            + e.getErrorCode() + "; Message: " + e.getMessage());
        } catch (DatatypeConfigurationException e) {
            throw new IllegalStateException(
                    "DatatypeFactory cannot be instantiated."); 
        } 
    } 
 
    public EmployeeRecordType getEmployeeByEmpId(EmployeeIdType eit)
            throws DataProcessingFault { 
 
        checkNotEmpty(eit.getEmployeeId(), "Employee ID");