public JobExecution getJobExecution(Long jobExecutionId) throws NoSuchJobExecutionException {
   JobExecution jobExecution = jobExecutionDao.getJobExecution(jobExecutionId);
   if (jobExecution == null) {
     throw new NoSuchJobExecutionException("There is no JobExecution with id=" + jobExecutionId);
   }
   jobExecution.setJobInstance(jobInstanceDao.getJobInstance(jobExecution));
   try {
     jobExecution.setExecutionContext(executionContextDao.getExecutionContext(jobExecution));
   } catch (Exception e) {
     logger.info("Cannot load execution context for job execution: " + jobExecution);
   }
   stepExecutionDao.addStepExecutions(jobExecution);
   return jobExecution;
 }
 public StepExecution getStepExecution(Long jobExecutionId, Long stepExecutionId)
     throws NoSuchJobExecutionException, NoSuchStepExecutionException {
   JobExecution jobExecution = getJobExecution(jobExecutionId);
   StepExecution stepExecution = stepExecutionDao.getStepExecution(jobExecution, stepExecutionId);
   if (stepExecution == null) {
     throw new NoSuchStepExecutionException(
         "There is no StepExecution with jobExecutionId="
             + jobExecutionId
             + " and id="
             + stepExecutionId);
   }
   try {
     stepExecution.setExecutionContext(executionContextDao.getExecutionContext(stepExecution));
   } catch (Exception e) {
     logger.info("Cannot load execution context for step execution: " + stepExecution);
   }
   return stepExecution;
 }