I need to read the records from table and write into an xml file. When I configure the job, the Reader with JdbcCursorItemReader and writer with StaxEventItemWriter. Every thing is working fine and I could see the output xml file is created successfully with all the content.
Problem is when we go for Partition,
Since We need to process some business logic, we went to the option of doing partitioning the job for which we have cutomized the reader to accept list of <records> and to process the same in writer.
Reader partition is working fine. but writer is creating the output file only for the execution of first partition and it is getting failed from the second partition writer as "org.springframework.batch.item.ItemStreamException : File already exists:"
do we have any configuration to append to the existing file?
please help me in this if this is acheivable..
staxItemWriter = new StaxEventItemWriter<Bean>();
Awaiting for replies.