writer.writeStartElement(startElement.getName().getLocalPart());
//when i run on standalone machine with one thread, it works fine, but when i run the multiple jobs with multiple threads on the server it gives me the following error at
writer.writeStartElement(startElement.getName().getLocalPart());
javax.xml.stream.XMLStreamException: Trying to output second root, <element>
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) javax.xml.stream.XMLStreamException:
Trying to output second root, <handset>
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473)
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1480)
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1508)
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) at com.ctc.wstx.sw.BaseNsStreamWriter.checkStartElement(BaseNsStreamWriter.java:444)
ERROR [STDERR] (JBossQuartzScheduler_Worker-4) at com.ctc.wstx.sw.BaseNsStreamWriter.writeStartElement(BaseNsStreamWriter.java:292)