I need to call a job, from a takslet of another job.

Job A:Step A:
Tasklet A:get all the filenames with in a folder. In a loop, instantiate a job(Job B) with filepath parameter.
Job B: processes each file.


but while launching job B for first time i am getting an exception."Existing transaction detected in JobRepository. Please fix this and try again (e.g. remove @Transactional annotations from client)."