@Override public final JobStartException couldNotFindJobXml(final String xmlFile) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), couldNotFindJobXml$str(), xmlFile)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } @Override
@Test(expected = JobStartException.class) public void testBeanCreationExceptionOnStart() throws Exception { jsrJobOperator = BatchRuntime.getJobOperator(); try { jsrJobOperator.start("jsrJobOperatorTestBeanCreationException", null); } catch (JobStartException e) { assertTrue(e.getCause() instanceof BeanCreationException); throw e; } fail("Should have failed"); }
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if(exceptionHolder.size() > 0) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
public static <T> T clone(final T original) throws JobStartException { if (original == null) { return null; } try { cloner.reset(); return (T) cloner.clone(original); } catch (IOException e) { throw new JobStartException(e); } catch (ClassNotFoundException e) { throw new JobStartException(e); } } }
@Override public final JobStartException failToParseBatchXml(final Throwable e, final String batchXML) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), failToParseBatchXml$str(), batchXML), e); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String noSuchJobExecution = "JBERET000604: No job execution with id %s";
@Override public long start(final String jobXMLName, final Properties jobParameters) throws JobStartException, JobSecurityException { /* * The whole point of this method is to have JobStartException serve as a blanket exception for anything other * than the rest of the more specific exceptions declared on the throws clause. So we won't log but just rethrow. */ try { return startInternal(jobXMLName, jobParameters); } catch (final JobSecurityException e) { throw e; } catch (final Exception e) { throw new JobStartException(e); } }
@Override public final JobStartException failToParseJobXml(final Throwable e, final String jobName) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), failToParseJobXml$str(), jobName), e); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String failToParseBatchXml = "JBERET000603: Failed to parse batch XML %s";
@Override public long start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException { long retVal = 0L; /* * The whole point of this method is to have JobStartException serve as a blanket exception for anything other * than the rest of the more specific exceptions declared on the throws clause. So we won't log but just rethrow. */ try { retVal = startInternal(jobXMLName, jobParameters); } catch (JobSecurityException e) { throw e; } catch (Exception e) { throw new JobStartException(e); } return retVal; }
@Override public final JobStartException failToGetJobXml(final String jobName) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), failToGetJobXml$str(), jobName)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String failToParseJobXml = "JBERET000602: Failed to parse and bind XML for job %s";
@Override public long start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException { long retVal = 0L; /* * The whole point of this method is to have JobStartException serve as a blanket exception for anything other * than the rest of the more specific exceptions declared on the throws clause. So we won't log but just rethrow. */ try { retVal = startInternal(jobXMLName, jobParameters); } catch (JobSecurityException e) { throw e; } catch (Exception e) { throw new JobStartException(e); } return retVal; }
@Override public final JobStartException failToGetJobXml(final Throwable e, final String jobName) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), failToGetJobXml$str(), jobName), e); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } @Override
/** * @return job execution id. */ @Override @FFDCIgnore(JobSecurityException.class) public long start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException { long retVal = 0L; /* * The whole point of this method is to have JobStartException serve as a blanket exception for anything other * than the rest of the more specific exceptions declared on the throws clause. So we won't log but just rethrow. */ try { retVal = startInternal(jobXMLName, jobParameters); } catch (JobSecurityException e) { throw e; } catch (Exception e) { throw new JobStartException(e); } return retVal; }
@Override public final JobStartException cycleInheritance(final String inheritingElements) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), cycleInheritance$str(), inheritingElements)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String implementationNotFound = "JBERET000635: Could not find implementation of %s";
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if (!exceptionHolder.isEmpty()) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
@Override public final JobStartException couldNotFindJobXml(final String xmlFile) { final JobStartException result = new JobStartException(String.format(getLoggingLocale(), couldNotFindJobXml$str(), xmlFile)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } @Override
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if(exceptionHolder.size() > 0) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if(exceptionHolder.size() > 0) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if (!exceptionHolder.isEmpty()) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
batchContext.refresh(); } catch (BeanCreationException e) { throw new JobStartException(e); jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation); } catch (Exception e) { throw new JobStartException(e); if(exceptionHolder.size() > 0) { semaphore.release(); throw new JobStartException(exceptionHolder.get(0)); throw new JobStartException(e);
throw new JobStartException(e);