Missing CSS? SEVERE: java.io.IOException: Stream closed

240 views
Skip to first unread message

Gert

unread,
Mar 6, 2014, 8:08:02 AM3/6/14
to flying-sa...@googlegroups.com
No matter what versions of Flying saucer I am pulling in with Maven I am getting the following exception:

SEVERE: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:151)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at org.xhtmlrenderer.css.parser.Lexer.zzRefill(Lexer.java:1634)
at org.xhtmlrenderer.css.parser.Lexer.yylex(Lexer.java:1865)
at org.xhtmlrenderer.css.parser.CSSParser.next(CSSParser.java:1807)
at org.xhtmlrenderer.css.parser.CSSParser.la(CSSParser.java:1819)
at org.xhtmlrenderer.css.parser.CSSParser.stylesheet(CSSParser.java:159)
at org.xhtmlrenderer.css.parser.CSSParser.parseStylesheet(CSSParser.java:89)
at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:78)
at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:95)
at org.xhtmlrenderer.context.StylesheetFactoryImpl.getStylesheet(StylesheetFactoryImpl.java:174)
at org.xhtmlrenderer.context.StyleReference.readAndParseAll(StyleReference.java:123)
at org.xhtmlrenderer.context.StyleReference.setDocumentContext(StyleReference.java:107)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:176)
at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:143)
at com.myname.mypackage.PdfServlet.createFile(PdfServlet.java:113)

The PDF file *is* produced but obviously I want to know what is happening.
I put a question up on Stackoverflow (http://stackoverflow.com/questions/22206178/flying-saucer-severe-java-io-ioexception-stream-closed) but no answers so far.
Maybe here somebody who knows what I can do to avoid this exception?

Gert

unread,
Mar 6, 2014, 10:54:10 AM3/6/14
to flying-sa...@googlegroups.com
Please ignore this post. I found out that the original developer is hacking the document header and inserting extra CSS style sheets in a non compliant way. FS is trying to find these and cannot.
Sorry for posting, I should have looked a bit longer myself, but because I had had library version clashes before this surfaced I thought it was still related to that.
Reply all
Reply to author
Forward
0 new messages