0

I am running jobs in parallel. My job execution is always null when I use JobRepositoryFactoryBean. I need to use to use this. If I don't use this, then I will not be able to use metadata tables. Because I want to restart my job when it is not completed because of some failure reason. So, I want previous record which I will be fetching from metadata tables. And if I use MapJobRepositoryFactoryBean, the job execution is not null. But then there will not be insertion in metadata tables. I referred this link:-

My job is always null. Can't inject a batch job with Spring Batch. Why?

But the link is not working for me.

My congifuration is

<bean id="batchScheduler" class="com.abc.BatchScheduler"> <property name="jobLauncher" ref="jobLauncher" /> <property name="jobtwo" ref="JobTwo" /> </bean>

I searched a lot. Please help me out. I am not able to proceed.

Community
  • 1
  • 1
rucha
  • 135
  • 1
  • 9
  • 1
    Show us your code and exception with stack trace – Nghia Do Dec 02 '16 at 12:21
  • The problem is solved. But now I have some other issue. I want to start the job when the application is getting started. When jobA is running I am able to schedule jobB but not getting run. To do so, every time I need to stop and start the service. I have gone through many links which gives the solution of `SmartLifecycle` and `ApplicationListener`. Is it right solution for me ? If so, I am not getting how to use them. Will you please tell me ? – rucha Dec 03 '16 at 10:31
  • How did you resolve the problem? @rucha – mannuk May 10 '18 at 15:37

0 Answers0