Hello,

I'm trying to debug an exception that sometimes happens when Tomcat
renders a JSP page. I have a custom error page (error.jsp) in a Struts
2 application defined in struts.xml like this:

    <global-results>
        <result name="error">/error.jsp</result>
    </global-results>

Sometimes it fails to render with and Tomcat says that it can't read
the JSP file:

    org.apache.jasper.JasperException - Cannot read file: /error.jsp
    
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
    
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
    org.apache.jasper.compiler.JspReader.<init>(JspReader.java:122)
    ...

and the underlying exception is:

    org.apache.jasper.compiler.JspReader.<init> Exception parsing file
     java.io.IOException: Stream closed
            at 
java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67)
            at 
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142)
            at 
org.apache.catalina.webresources.AbstractArchiveResource$JarInputStreamWrapper.read(AbstractArchiveResource.java:255)
            at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
            at java.io.InputStreamReader.read(InputStreamReader.java:184)
            at java.io.Reader.read(Reader.java:140)
            at org.apache.jasper.compiler.JspReader.<init>(JspReader.java:115)
            at 
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:225)
            at 
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
            at 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)

But error.jsp exists in the .war file, I checked that. How can I
determine what is causing the input stream to get closed?

I would appreciate any help.

Thank you.

Tomcat version: 8.0.28
OS: Linux 4.14
JVM: Oracle 1.8.0_92-b14

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to