Open spring-projects-issues opened 5 years ago
MOHAMMED EL AMINE BOUFATAH commented
I found what the problem was:
As I create files with a name that contains a timestamp. whenever there is a restart the timestamp is not the same, which is normal.
at T1: it creates file with name: "file_T1.txt"
then when it restarts, it starts at T2, spring batch looks for a file named : "file_T2.txt" which does not exist, and therefore you get the exception.
_The error message is not the right one, I should have had "Could not find File file_T2.txt" rather than "File is not writable"._
MOHAMMED EL AMINE BOUFATAH opened BATCH-2806 and commented
Hello,
I am having a problem while working with FlatItemWriter. When I am in a restart mode I get an exception: org.springframework.batch.item.ItemStreamException: File is not writable
It seems like this exception is thrown from +org.springframework.batch.item.util.FileUtils+ inside method +setUpOutputFile+.
When googling the issue, many people claim that this is a Spring bug. Do you confirm the assertion ? if yes, in which version was the issue fixed ?
Thank you very much for your help.
Affects: 2.2.7