Examples of NoSuchJobExecutionException


Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException

  @Override
  public Collection<StepExecution> getStepExecutions(Long jobExecutionId) throws NoSuchJobExecutionException {

    JobExecution jobExecution = jobExecutionDao.getJobExecution(jobExecutionId);
    if (jobExecution == null) {
      throw new NoSuchJobExecutionException("No JobExecution with id=" + jobExecutionId);
    }

    stepExecutionDao.addStepExecutions(jobExecution);

    String jobName = jobExecution.getJobInstance() == null ? jobInstanceDao.getJobInstance(jobExecution).getJobName() : jobExecution.getJobInstance().getJobName();
View Full Code Here

Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException

  @Override
  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));
    }
View Full Code Here

Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException

  private JobExecution findExecutionById(long executionId) throws NoSuchJobExecutionException {
    JobExecution jobExecution = jobExplorer.getJobExecution(executionId);

    if (jobExecution == null) {
      throw new NoSuchJobExecutionException("No JobExecution found for id: [" + executionId + "]");
    }
    return jobExecution;

  }
View Full Code Here

Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException

    final List<StepExecution> stepExecutions2 = new ArrayList<StepExecution>();
    stepExecutions2.add(step2);
    jobExecution1.addStepExecutions(stepExecutions1);

    when(jobService.getStepExecutions(5555L)).thenThrow(
        new NoSuchJobExecutionException("No JobExecution with id=5555L"));
    when(jobService.getStepExecutions(2L)).thenReturn(stepExecutions1);

    when(jobService.getStepExecution(2L, 1L)).thenReturn(step1);
    when(jobService.getStepExecution(5555L, 1L)).thenThrow(
        new NoSuchJobExecutionException("No JobExecution with id=5555L"));
    when(jobService.getStepExecution(2L, 5555L)).thenThrow(
        new NoSuchStepExecutionException("No StepExecution with id=5555L"));
    when(jobService.countStepExecutionsForStep(job1.getName(), step1.getStepName())).thenReturn(1);
    when(jobService.listStepExecutionsForStep(job1.getName(), step1.getStepName(), 0, 1000)).thenReturn(
        stepExecutions2);
View Full Code Here

Examples of org.springframework.batch.core.launch.NoSuchJobExecutionException

    when(jobService.listJobExecutions(5, 5)).thenReturn(jobExecutions1);
    when(jobService.listJobExecutions(0, 20)).thenReturn(jobExecutions1);
    when(jobService.listJobExecutionsForJob(job2.getName(), 0, 20)).thenReturn(jobExecutions2);
    when(jobService.getJobExecution(jobExecution1.getId())).thenReturn(jobExecution1);
    when(jobService.getJobExecution(99999L)).thenThrow(new NoSuchJobExecutionException("Not found."));

    when(jobService.stop(3l)).thenThrow(JobExecutionNotRunningException.class);
    when(jobService.stop(5l)).thenThrow(NoSuchJobExecutionException.class);
    when(jobService.getJobExecution(1234l)).thenThrow(NoSuchJobExecutionException.class);
View Full Code Here

Examples of org.springframework.xd.dirt.job.NoSuchJobExecutionException

    try {
      jobExecution = jobService.getJobExecution(executionId);
    }
    catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
      throw new NoSuchJobExecutionException(executionId);
    }

    final Set<String> restartableJobs = new HashSet<String>(jobLocator.getAllRestartableJobs());
    final Set<String> deployedJobs = new HashSet<String>(jobLocator.getJobNames());
    final Set<String> jobDefinitionNames = new HashSet<String>(getJobDefinitionNames());
View Full Code Here

Examples of org.springframework.xd.dirt.job.NoSuchJobExecutionException

    }
    catch (org.springframework.batch.core.launch.JobExecutionNotRunningException e) {
      throw new JobExecutionNotRunningException(jobExecutionId);
    }
    catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
      throw new NoSuchJobExecutionException(jobExecutionId);
    }
  }
View Full Code Here

Examples of org.springframework.xd.dirt.job.NoSuchJobExecutionException

    final JobExecution jobExecution;
    try {
      jobExecution = jobService.getJobExecution(jobExecutionId);
    }
    catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
      throw new NoSuchJobExecutionException(jobExecutionId);
    }

    if (jobExecution.isRunning()) {
      throw new org.springframework.xd.dirt.job.JobExecutionAlreadyRunningException(
          "Job Execution for this job is already running: " + jobExecution.getJobInstance());
View Full Code Here

Examples of org.springframework.xd.dirt.job.NoSuchJobExecutionException

    try {
      stepExecutions = jobService.getStepExecutions(jobExecutionId);
    }
    catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
      throw new NoSuchJobExecutionException(jobExecutionId);
    }

    final Collection<StepExecutionInfoResource> result = new ArrayList<StepExecutionInfoResource>();

    for (StepExecution stepExecution : stepExecutions) {
View Full Code Here

Examples of org.springframework.xd.dirt.job.NoSuchJobExecutionException

    }
    catch (org.springframework.batch.admin.service.NoSuchStepExecutionException e) {
      throw new NoSuchStepExecutionException(stepExecutionId);
    }
    catch (org.springframework.batch.core.launch.NoSuchJobExecutionException e) {
      throw new NoSuchJobExecutionException(jobExecutionId);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.