if(log.isDebugEnabled()) {
log.debug("Got StepExecution: " + stepExecution);
log.debug("Locating Step: " + stepName);
}
Step step = getStepLocator().getStep(stepName);
if(log.isDebugEnabled()) {
log.debug("Located step: " + step);
}
if (step == null) {
throw new NoSuchStepException(String.format("No Step with name [%s] could be located.", stepName));
}
try {
if(log.isDebugEnabled()) {
log.debug("Executing step: " + step + " / " + stepExecution);
}
step.execute(stepExecution);
} catch (JobInterruptedException e) {
log.error("error executing step 1", e);
stepExecution.setStatus(BatchStatus.STOPPED);
} catch (Throwable e) {
log.error("error executing step 2", e);