@Override
public void updateStepExecution(final StepExecution stepExecution) {
final String update = sqls.getProperty(UPDATE_STEP_EXECUTION);
final Connection connection = getConnection();
final StepExecutionImpl stepExecutionImpl = (StepExecutionImpl) stepExecution;
PreparedStatement preparedStatement = null;
try {
preparedStatement = connection.prepareStatement(update);
preparedStatement.setTimestamp(1, new Timestamp(stepExecution.getEndTime().getTime()));
preparedStatement.setString(2, stepExecution.getBatchStatus().name());
preparedStatement.setString(3, stepExecution.getExitStatus());
preparedStatement.setString(4, TableColumns.formatException(stepExecutionImpl.getException()));
preparedStatement.setBytes(5, BatchUtil.objectToBytes(stepExecution.getPersistentUserData()));
preparedStatement.setLong(6, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.READ_COUNT));
preparedStatement.setLong(7, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.WRITE_COUNT));
preparedStatement.setLong(8, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.COMMIT_COUNT));
preparedStatement.setLong(9, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.ROLLBACK_COUNT));
preparedStatement.setLong(10, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.READ_SKIP_COUNT));
preparedStatement.setLong(11, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.PROCESS_SKIP_COUNT));
preparedStatement.setLong(12, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.FILTER_COUNT));
preparedStatement.setLong(13, stepExecutionImpl.getStepMetrics().get(Metric.MetricType.WRITE_SKIP_COUNT));
preparedStatement.setBytes(14, BatchUtil.objectToBytes(stepExecutionImpl.getReaderCheckpointInfo()));
preparedStatement.setBytes(15, BatchUtil.objectToBytes(stepExecutionImpl.getWriterCheckpointInfo()));
preparedStatement.setLong(16, stepExecution.getStepExecutionId());
preparedStatement.executeUpdate();
} catch (final Exception e) {