BATCH-2054: StaxEventItemWriter fails on a NullPointerException with

Spring OXM 3.2.x.
This commit is contained in:
jpraet
2013-06-30 14:02:29 +02:00
committed by Michael Minella
parent a939b194fe
commit a65bcc48d1
4 changed files with 46 additions and 1 deletions

View File

@@ -658,7 +658,7 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
finally {
try {
eventWriter.close();
delegateEventWriter.close();
}
catch (XMLStreamException e) {
log.error("Unable to close file resource: [" + resource + "] " + e);

View File

@@ -39,4 +39,10 @@ public class NoStartEndDocumentStreamWriter extends AbstractEventWriterWrapper {
wrappedEventWriter.add(event);
}
}
// prevents OXM Marshallers from closing the XMLEventWriter
@Override
public void close() throws XMLStreamException {
flush();
}
}