title: StaxEventItemWriter - File not writable issue
body: <p>I have an item writer configured as below which generates an xml:</p>
  
  <pre><code>&lt;beans:bean id="delegateItemWriter" class="org.springframework.batch.item.xml.StaxEventItemWriter" scope="step"&gt;
      &lt;beans:property name="resource" value="file:#{jobParameters['OutputDirPath']}${myFileName}" /&gt; 
      &lt;beans:property name="overwriteOutput" value="true"/&gt;
      &lt;beans:property name="rootTagName" value="disclosure-feed" /&gt;
      &lt;beans:property name="rootElementAttributes" &gt;
          &lt;beans:map&gt;
              &lt;beans:entry key="xmlns:xsi" value="http://www.w3.org/2001/XMLSchema-instance" /&gt;               
              &lt;beans:entry key="xsi:noNamespaceSchemaLocation" value="XYZ.xsd"/&gt;
          &lt;/beans:map&gt;
      &lt;/beans:property&gt;
      &lt;beans:property name="marshaller" ref="xmlMarshaller" /&gt;  
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>Even though every thing seems correct, sometimes on restarting a job after fixing a failure of previous run, I get below error:</p>
  
  <pre><code>2013-07-19 02:14:34,921 [main] ERROR org.springframework.batch.core.step.AbstractStep  - Encountered an error executing the step
  org.springframework.batch.item.ItemStreamException: File is not writable: [/myOutputDir/myOutput.xml]
  </code></pre>
  
  <p>When I manually remove the job entries from batch_ tables so that the job starts afresh from the start instead of from where it failed during last run, the file gets generated as expected. </p>
  
  <p>What is the reason for this issue?
  How to resolve it ? Is there some configuration stuff I am missing ?</p>
  
  <p>Thanks for reading!</p>