Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7594

XmlUtil.serialize is not processing whole message

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.3.7
    • Fix Version/s: None
    • Component/s: XML Processing
    • Labels:
      None
    • Environment:
      Linux (Virtual Machine)

      Description

      Consider following code snippet:

      def writer = new FileWriter(some_file_path)
      def xmll = new StreamingMarkupBuilder().bind {
      root {
      //datarows = quite large chunk of data that I have, structured in rows
      datarows.each { row ->
      datarow()

      { //6 fields definitions here }

      }
      }
      writer << XmlUtil.serialize(xmll)

      when printing xmll (as in: log.info ... ), the message is correct (i.e. I have loooooong xml string with proper data); however, when I check the output file of the writer, it is missing a significant part of data (I have, like, around first 40% of the datarows, or first <8k characters out of 20k total), and it looks as if the buffer ended (but no exception was thrown nor warning) because the last record/line looks like this:
      <datarowhere>
      <somefield>SOME_DATA_INSIDE</somef

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              thasar Tomasz Nowak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: