On Jun 1, 2015, at 7:58 AM, nikolay.kudryavt...@gmail.com wrote:
> This happens only when I use some kind of input stream(either 
> java.io.FileInputStream or io/input-stream wrapper). Just doing (parse-str 
> (slurp file)) works.
> 
> So, when I have a file containing only this:
> <t>aaaaaaaaaaaaaaaaaaaaaaaaaa</t>
> 
> I get this exception:
> 1. Unhandled javax.xml.stream.XMLStreamException
>    ParseError at [row,col]:[1,33] Message: Stream Closed
> 
>                            nil:   -1  
> com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl/next
>                        xml.clj:  287  clojure.data.xml/pull-seq/fn
>                   LazySeq.java:   42  clojure.lang.LazySeq/sval
>                   LazySeq.java:   60  clojure.lang.LazySeq/seq

Based on the this I’d say you’re tripping over lazy chunked sequence 
processing. Each chunk is typically 32 elements. You tend to get "stream 
closed" or "connection closed" errors if you let a lazy sequence escape the 
open/close logic in your code, since it gets closed after just the first chunk.

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)



-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to