Hi Support Team,
We are licensed users of SmartGWT. version : 'v11.0p_2019-06-05/Enterprise Deployment'
We are getting beow exception when we try to export grid content to PDF. Same code works on different pages. We see the same error on successful export as well.
But it failed on some.
----------------------Error----------
java.io.IOException: Stream closed
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:159)
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
14:13:22,534 INFO [STDOUT] at java.io.InputStreamReader.read(InputStreamReader.java:184)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.Lexer.zzRefill(Lexer.java:1634)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.Lexer.yylex(Lexer.java:1865)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.next(CSSParser.java:1798)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.la(CSSParser.java:1810)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.stylesheet(CSSParser.java:159)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.parseStylesheet(CSSParser.java:89)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:78)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:95)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.getStylesheet(StylesheetFactoryImpl.java:174)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StyleReference.readAndParseAll(StyleReference.java:123)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StyleReference.setDocumentContext(StyleReference.java:107)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:175)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:142)
14:13:22,803 INFO [STDOUT] at com.isomorphic.contentexport.PdfExport.getPdfRenderer(PdfExport.java:346)
14:13:22,803 INFO [STDOUT] at com.isomorphic.contentexport.PdfExport.getPdfObject(PdfExport.java:76)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.BuiltinRPC.getPdfObject(BuiltinRPC.java:1159)
14:13:22,803 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:13:22,803 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:13:22,803 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:13:22,803 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:498)
14:13:22,803 INFO [STDOUT] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:966)
14:13:22,803 INFO [STDOUT] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:796)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:329)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:67)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:249)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:355)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:184)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:152)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
14:13:22,803 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:162)
------------------------------------
Code
Below is the code we used.
export.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
@Override
public void onClick(
com.smartgwt.client.widgets.events.ClickEvent event) {
DSRequest req = new DSRequest();
req.setAttribute("skinName", "Enterprise");
req.setAttribute("pdfName", "Export_" + fileName);
RPCManager.exportContent(listGrid, req);
}
});
We are licensed users of SmartGWT. version : 'v11.0p_2019-06-05/Enterprise Deployment'
We are getting beow exception when we try to export grid content to PDF. Same code works on different pages. We see the same error on successful export as well.
But it failed on some.
----------------------Error----------
java.io.IOException: Stream closed
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:159)
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
14:13:22,534 INFO [STDOUT] at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
14:13:22,534 INFO [STDOUT] at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
14:13:22,534 INFO [STDOUT] at java.io.InputStreamReader.read(InputStreamReader.java:184)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.Lexer.zzRefill(Lexer.java:1634)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.Lexer.yylex(Lexer.java:1865)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.next(CSSParser.java:1798)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.la(CSSParser.java:1810)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.stylesheet(CSSParser.java:159)
14:13:22,534 INFO [STDOUT] at org.xhtmlrenderer.css.parser.CSSParser.parseStylesheet(CSSParser.java:89)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:78)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.parse(StylesheetFactoryImpl.java:95)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StylesheetFactoryImpl.getStylesheet(StylesheetFactoryImpl.java:174)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StyleReference.readAndParseAll(StyleReference.java:123)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.context.StyleReference.setDocumentContext(StyleReference.java:107)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:175)
14:13:22,803 INFO [STDOUT] at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:142)
14:13:22,803 INFO [STDOUT] at com.isomorphic.contentexport.PdfExport.getPdfRenderer(PdfExport.java:346)
14:13:22,803 INFO [STDOUT] at com.isomorphic.contentexport.PdfExport.getPdfObject(PdfExport.java:76)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.BuiltinRPC.getPdfObject(BuiltinRPC.java:1159)
14:13:22,803 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:13:22,803 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:13:22,803 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:13:22,803 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:498)
14:13:22,803 INFO [STDOUT] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:966)
14:13:22,803 INFO [STDOUT] at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:796)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:329)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:67)
14:13:22,803 INFO [STDOUT] at com.isomorphic.rpc.RPCRequest.execute(RPCRequest.java:249)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.handleRPCRequest(IDACall.java:355)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:184)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:152)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
14:13:22,803 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
14:13:22,803 INFO [STDOUT] at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:162)
------------------------------------
Code
Below is the code we used.
export.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
@Override
public void onClick(
com.smartgwt.client.widgets.events.ClickEvent event) {
DSRequest req = new DSRequest();
req.setAttribute("skinName", "Enterprise");
req.setAttribute("pdfName", "Export_" + fileName);
RPCManager.exportContent(listGrid, req);
}
});
Comment