You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Tomasz Nowak (JIRA)" <ji...@apache.org> on 2015/09/18 14:29:04 UTC

[jira] [Commented] (GROOVY-7594) XmlUtil.serialize is not processing whole message

    [ https://issues.apache.org/jira/browse/GROOVY-7594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14847356#comment-14847356 ] 

Tomasz Nowak commented on GROOVY-7594:
--------------------------------------

It was due to '<<' and not closing the buffer properly - still, could you please verify?

> XmlUtil.serialize is not processing whole message
> -------------------------------------------------
>
>                 Key: GROOVY-7594
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7594
>             Project: Groovy
>          Issue Type: Bug
>          Components: XML Processing
>    Affects Versions: 2.3.7
>         Environment: Linux (Virtual Machine)
>            Reporter: Tomasz Nowak
>            Assignee: Paul King
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)