tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62976] New: IllegalStateException: zip file closed
Date Tue, 04 Dec 2018 05:02:12 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62976

            Bug ID: 62976
           Summary: IllegalStateException: zip file closed
           Product: Tomcat 9
           Version: 9.0.13
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: karl@xk72.com
  Target Milestone: -----

Created attachment 36290
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36290&action=edit
Test case reproducing the issue

It appears that the bug https://bz.apache.org/bugzilla/show_bug.cgi?id=57887
has resurfaced in Tomcat 9.

The test case from that bug fails in Tomcat 9 with the error stack trace:

04-Dec-2018 17:57:06.353 SEVERE
[ContainerBackgroundProcessor[StandardEngine[Catalina]]]
org.apache.catalina.core.ApplicationContext.log Background compile failed
 java.lang.IllegalStateException: zip file closed
        at java.util.zip.ZipFile.ensureOpen(ZipFile.java:686)
        at java.util.zip.ZipFile.getEntry(ZipFile.java:315)
        at java.util.jar.JarFile.getEntry(JarFile.java:240)
        at
org.apache.tomcat.util.scan.JarFileUrlJar.getLastModified(JarFileUrlJar.java:94)
        at
org.apache.jasper.JspCompilationContext.getLastModified(JspCompilationContext.java:380)
        at
org.apache.jasper.JspCompilationContext.getLastModified(JspCompilationContext.java:368)
        at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:480)
        at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:434)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:596)
        at
org.apache.jasper.compiler.JspRuntimeContext.checkCompile(JspRuntimeContext.java:385)
        at
org.apache.jasper.servlet.JspServlet.periodicEvent(JspServlet.java:357)
        at
org.apache.catalina.core.StandardWrapper.backgroundProcess(StandardWrapper.java:623)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1398)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1402)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1402)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1402)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1370)
        at java.lang.Thread.run(Thread.java:748)

This appears to be due to the .tag file in the JAR.

I have inserted debugging into JarFileUrlJar and I can see that getLastModified
is called successfully, close() is called, and then getLastModified is called
again and fails as the zip is closed.

I have attached the same test case hoping it's easier that getting it from that
bug. Make a WAR from the WebContent directory and deploy. Load the web app.
Wait a minute.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message