Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26497

    I am using java 1.6. pd4ml 3.70, application running on resin 3.19.

    when using the pd4ml taglib i am getting IllegalStateException. and the message:
    IllegalStateException: http://localhost:8090/.test.html: tried to write 5429 bytes with content-length 5407 (At 's', char=115).
    Sometimes the pdf is generatated ok, and other times, i gives me an error.

    So i would guess that the pdf is missing some bytes, to complete viewing? Any ideas on how to avoid this error?

    #28335

    My first suspect is that the PDF bytes are sent to the browser not in bin, but in text mode. The content has grown because of newline conversion from “n” to “nr”. But I cannot be sure about that before I took a look to your code.

    Could you please publish a JSP sample here or send it to support pd4ml com?

    #28336

    We are using struts2 web tier.
    I am able to see the pdf without any problem, but I am getting following error in the log, while adding the pd4ml tag in jsp.
    Without pd4ml tag in my jsp, I am not getting any error.
    Any thoughts???

    … 38 more
    aused by: org.apache.tiles.util.TilesIOException: JSPException including path ‘
    pages/common/footer.jsp’.
    at org.apache.tiles.servlet.context.ServletTilesRequestContext.wrapServl
    tException(ServletTilesRequestContext.java:298)
    at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesR
    questContext.java:82)
    at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTiles
    equestContext.java:73)
    at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesReq
    estContextWrapper.java:72)
    at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTil
    sRequestContext.java:88)
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
    ava:283)
    at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttribute
    ag.java:140)
    at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttribute
    ag.java:117)
    at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport
    java:154)
    at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecur
    tyTagSupport.java:75)
    at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTag
    upport.java:80)
    at org.apache.jsp.pages.common.mainLayout_jsp._jspx_meth_tiles_005finser
    Attribute_005f3(mainLayout_jsp.java:397)
    at org.apache.jsp.pages.common.mainLayout_jsp._jspService(mainLayout_jsp
    java:144)
    … 50 more
    aused by: java.lang.IllegalStateException: getOutputStream() has already been c
    lled for this response
    at org.apache.catalina.connector.Response.getWriter(Response.java:608)
    at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade
    java:200)
    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper
    java:101)
    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper
    java:101)
    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper
    java:101)
    at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:12
    )
    at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.jav
    :118)
    at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:296)

    at java.io.PrintWriter.write(PrintWriter.java:382)
    at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.jav
    :119)
    at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.jav
    :181)
    at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(J
    pFactoryImpl.java:122)
    at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactor
    Impl.java:79)
    at org.apache.jsp.pages.common.footer_jsp._jspService(footer_jsp.java:32
    )
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    java:376)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
    0)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    cationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    lterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
    tcher.java:674)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
    spatcher.java:579)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
    atcher.java:516)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
    java:930)
    at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.j
    va:674)
    at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
    :668)
    at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesR
    questContext.java:80)
    … 61 more

    #28337

    @PD4ML wrote:

    My first suspect is that the PDF bytes are sent to the browser not in bin, but in text mode. The content has grown because of newline conversion from “n” to “nr”. But I cannot be sure about that before I took a look to your code.

    I dont know if that was what you meant. But i had some line breaks before the transform tag.

    thanks

    #28334

    IllegalStateException: getOutputStream() has already been called is a known issue:
    pdf-generation-troubleshooting-f4/getoutputstream-has-already-been-called-exception-t14.html

    IllegalStateException: http: //localhost/test.html: tried to write Y bytes with content-length Y is something new for us, but could also be caused by new line and whitespace characters lead tag

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.