Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-337

Large CDATA truncated in save()

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Version 2.2, Version 2.3
    • Version 2.3.1
    • XmlObject
    • None
    • i386, win, jdk1.4/1.5

    Description

      I have a XML document (25k) that contains several CDATA sections. When the document is written using save() method (I tried multiple streams/file/...), one of the CDATA sections (large one) is not completely written - there is missing part of the CDATA section content and the finishing mark (]]>).

      Parsed document looks like:
      <report...>
      ...
      <![CDATA[
      ...
      <xyz/>
      ...
      ]]></xml-property>
      </report>

      Corrupted version produced by save():
      <report...>
      ...
      <![CDATA[
      ...
      <xy</xml-property>
      </report>

      I.e. the rest of the document is written properly.

      To reproduce my issue just parse the attached XML document (even as xsd:any) and save it back. Then compare both files.

      (I suspected org.apache.xmlbeans.impl.store.Saver, that buffers are not properly flushed. As quickfix I extended buffer sizes and it helped. Presuming that my issue might have the same cause as #XMLBEANS-335)

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dvorka Martin Dvorak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment