stmt.setString(9, submission.getExceptionInfo());
stmt.setString(10, submission.getExceptionStackTrace());
result = stmt.executeUpdate();
if (result != 1) {
throw new SqoopException(DerbyRepoError.DERBYREPO_0012,
Integer.toString(result));
}
ResultSet rsetSubmissionId = stmt.getGeneratedKeys();
if (!rsetSubmissionId.next()) {
throw new SqoopException(DerbyRepoError.DERBYREPO_0013);
}
long submissionId = rsetSubmissionId.getLong(1);
if(submission.getCounters() != null) {
createSubmissionCounters(submissionId, submission.getCounters(), conn);
}
// Save created persistence id
submission.setPersistenceId(submissionId);
} catch (SQLException ex) {
logException(ex, submission);
throw new SqoopException(DerbyRepoError.DERBYREPO_0034, ex);
} finally {
closeStatements(stmt);
}
}