i make one job that like this.
<batch:job id="parentJob">
<batch:step id="parentJob.step1">
<batch:job ref="childJob" job-launcher="batchJobLauncher" />
</batch:step>
</batch:job>
the parentJob has childJob as a step. and i assign batchJobLauncher as a childJob's launcher.
the problem is the spring initializing is fail with this error message.
Caused by: java.lang.IllegalArgumentException: JobRepository must be set
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.batch.core.job.AbstractJob.afterPropertiesSet(AbstractJob.java:109)
at org.springframework.batch.core.configuration.xml.JobParserJobFactoryBean.getObject(JobParserJobFactoryBean.java:86)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 136 more
a job must have a reference of jobRepository but the parentJob doesn't.
i define job repository well and another job is fine with it.
if remove the childJob's specific launcher, spring initializing is success.
i debug spring code, i found JobParserJobFactoryBean class have null JobRepository so the parentJob has null, too.
- version info
- spring 3.2.0.RELEASE
- spring-batch 2.1.8.RELEASE
what's the problem??
Aucun commentaire:
Enregistrer un commentaire