Java 类org.springframework.batch.core.launch.NoSuchJobInstanceException 实例源码
项目:spring-cloud-dashboard
文件:RestControllerAdvice.java
/**
* Log the exception message at warn level and stack trace as trace level.
* Return response status HttpStatus.NOT_FOUND
*/
@ExceptionHandler({NoSuchAppRegistrationException.class,
NoSuchTaskDefinitionException.class,
NoSuchTaskExecutionException.class,
NoSuchJobExecutionException.class,
NoSuchJobInstanceException.class,
NoSuchJobException.class,
NoSuchStepExecutionException.class,
MetricsMvcEndpoint.NoSuchMetricException.class})
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseBody
public VndErrors onNotFoundException(Exception e) {
String logref = logWarnLevelExceptionMessage(e);
if (logger.isTraceEnabled()) {
logTraceLevelStrackTrace(e);
}
String msg = getExceptionMessage(e);
return new VndErrors(logref, msg);
}
项目:spring-cloud-dataflow
文件:RestControllerAdvice.java
/**
* Log the exception message at warn level and stack trace as trace level. Return
* response status HttpStatus.NOT_FOUND
*
* @param e one of the exceptions, {@link NoSuchStreamDefinitionException},
* {@link NoSuchAppRegistrationException}, {@link NoSuchTaskDefinitionException},
* {@link NoSuchTaskExecutionException}, {@link NoSuchJobExecutionException},
* {@link NoSuchJobInstanceException}, {@link NoSuchJobException},
* {@link NoSuchStepExecutionException},
* {@link MetricsMvcEndpoint.NoSuchMetricException}, {@link NoSuchAppException}, or
* {@link NoSuchAppInstanceException}
* @return the error response in JSON format with media type
* application/vnd.error+json
*/
@ExceptionHandler({ NoSuchStreamDefinitionException.class, NoSuchAppRegistrationException.class,
NoSuchTaskDefinitionException.class, NoSuchTaskExecutionException.class, NoSuchJobExecutionException.class,
NoSuchJobInstanceException.class, NoSuchJobException.class, NoSuchStepExecutionException.class,
MetricsMvcEndpoint.NoSuchMetricException.class, NoSuchAppException.class,
NoSuchAppInstanceException.class, ApplicationDoesNotExistException.class })
@ResponseStatus(HttpStatus.NOT_FOUND)
@ResponseBody
public VndErrors onNotFoundException(Exception e) {
String logref = logWarnLevelExceptionMessage(e);
if (logger.isTraceEnabled()) {
logTraceLevelStrackTrace(e);
}
String msg = getExceptionMessage(e);
return new VndErrors(logref, msg);
}
项目:saos
文件:SaosJobServiceAdapter.java
public JobInstance getJobInstance(long jobInstanceId)
throws NoSuchJobInstanceException {
return simpleJobService.getJobInstance(jobInstanceId);
}
项目:spring-cloud-dataflow
文件:JobInstanceController.java
/**
* View the details of a single task instance, specified by id.
*
* @param id the id of the requested {@link JobInstance}
* @return the {@link JobInstance}
* @throws NoSuchJobInstanceException if job instance for the id does not exist.
* @throws NoSuchJobException if the job for the job instance does not exist.
*/
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public JobInstanceResource view(@PathVariable("id") long id) throws NoSuchJobInstanceException, NoSuchJobException {
JobInstanceExecutions jobInstance = taskJobService.getJobInstance(id);
return jobAssembler.toResource(jobInstance);
}
项目:spring-cloud-dataflow
文件:TaskJobService.java
/**
* Retrieves a {@link JobInstance} from the JobRepository and matches it with the
* associated {@link JobExecution}s.
*
* @param id the id of the {@link JobInstance}
* @return the {@link JobInstanceExecutions} associated with the id.
* @throws NoSuchJobInstanceException if job instance id does not exist.
* @throws NoSuchJobException if the job for the job instance does not exist.
*/
JobInstanceExecutions getJobInstance(long id) throws NoSuchJobInstanceException, NoSuchJobException;
项目:spring-cloud-dataflow
文件:DefaultTaskJobService.java
/**
* Retrieves a {@link JobInstance} from the JobRepository and matches it with the
* associated {@link JobExecution}s.
*
* @param id the id of the {@link JobInstance}
* @return the {@link JobInstanceExecutions} associated with the id.
*/
@Override
public JobInstanceExecutions getJobInstance(long id) throws NoSuchJobInstanceException, NoSuchJobException {
return getJobInstanceExecution(jobService.getJobInstance(id));
}