Hi all,

I have two relative complex jobs which are working fine so far. Now, I have the task to merge them to one job.

My first try was to define a job with two steps. The first step invokes the first job, the second step invokes the second job. Sadly, by doing this, I am getting an OutOfMemoryError. It seems that the objects of an Step with ItemReader/Writer are not garbage-collected. It runs with commit-interval=10000

As mentioned the step runs properly as a dedicated job. But as a nested job, it fails.

I have found a disagreeable workaround. Instead of nesting the jobs in one further job, I am copying all steps to the new job. Then it is running properly.


But why? What do I have to consider while nesting Spring Batch Jobs?

For any help, I am very happy...

Regards,
miwo