Announcement Announcement Module
Collapse
No announcement yet.
The root tag being closed twice in Marshalling using StaxEventItemWriter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The root tag being closed twice in Marshalling using StaxEventItemWriter

    The root tag element that i specified using
    Code:
    <property name="rootTagName" value="SUPUN" />
    in the StaxEventItemWriter is closed twice at the end of the created XML file.What is the reason for this.

    Code:
    <SUPUN>
    ..
    ..
    ..
    </SUPUN></SUPUN>

  • #2
    Are you using Woodstox? See http://jira.springframework.org/browse/BATCH-761

    Comment


    • #3
      woodstox is there in the project librararies and being used in another part of the project but has no visible connection to the batch processing part.
      I am using org.springframework.batch.item.xml.StaxEventItemWr iter with Castor Mapping to parse the xml.
      is org.springframework.batch.item.xml.StaxEventItemWr iter connected to woodstox in any other way.

      Comment


      • #4
        StaxEventItemWriter uses a factory to create XMLEventWriter implementation, it depends on your environment what class it is - so in your case Woodstox is likely.

        Comment


        • #5
          is there a way to unset the dependency on woodstox using the configuration

          Comment


          • #6
            We currenlty don't provide configuration options for this, you can start a jira if you'd like to provide factoryId and classloader for the XMLOutputFactory.newInstance(..) call.

            Workaround implmented in development version is that endDocument method is protected so you can override it with no-op implementation for Woodstox.

            Comment


            • #7
              maybe it is too late, but i still see the error,
              @Override
              protected void endDocument(XMLEventWriter writer) throws XMLStreamException {}
              I overrode this method and fixed it.

              Comment

              Working...
              X