Jetty
  1. Jetty
  2. JETTY-1471

JSF2 on Jetty gives randomly 'zip file closed'

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 7.5.4
    • Fix Version/s: None
    • Component/s: Servlet
    • Labels:
      None
    • Environment:
      OSX 10.6.8, Java 1.6.0_26-b03-384-10M3425
    • Number of attachments :
      0

      Description

      The following was posted on stackoverflow: http://stackoverflow.com/questions/7715985/jsf2-on-jetty-gives-randomly-zip-file-closed-but-works-when-running-from-maven

      I am experiencing the same issue. Seemingly randomly, resources aren't sent to the client and I get these exceptions in the log:

      java.lang.IllegalStateException: zip file closed
      at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416)
      at java.util.zip.ZipFile.access$100(ZipFile.java:31)
      at java.util.zip.ZipFile$2.hasMoreElements(ZipFile.java:316)
      at java.util.jar.JarFile$1.hasMoreElements(JarFile.java:222)
      at org.eclipse.jetty.util.resource.JarFileResource.exists(JarFileResource.java:163)
      at org.eclipse.jetty.webapp.WebAppContext.getResource(WebAppContext.java:321)
      at org.eclipse.jetty.webapp.WebAppContext$Context.getResource(WebAppContext.java:1222)
      at org.eclipse.jetty.servlet.DefaultServlet.getResource(DefaultServlet.java:366)
      at org.eclipse.jetty.server.ResourceCache.lookup(ResourceCache.java:188)
      at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:445)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1359)

      I haven't been able to get the workaround mentioned in the post working, but I have found similar threads on other sites claiming the same workaround works.

        Activity

        Hide
        Asaf Yarkoni added a comment -

        I'm experiencing the same issue also on 7.4.5 and 7.3.1 with JSF2 very simple project

        Show
        Asaf Yarkoni added a comment - I'm experiencing the same issue also on 7.4.5 and 7.3.1 with JSF2 very simple project
        Hide
        Jan Bartel added a comment -

        Please see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=364936

        If you use jetty-7.6.0.RC2, and use the recommend setting in your xml file (or equivalent code):
        <Set class="org.eclipse.jetty.util.resource.Resource" name="defaultUseCaches">false</Set>

        then the problem should not occur.

        regards
        Jan

        Show
        Jan Bartel added a comment - Please see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=364936 If you use jetty-7.6.0.RC2, and use the recommend setting in your xml file (or equivalent code): <Set class="org.eclipse.jetty.util.resource.Resource" name="defaultUseCaches">false</Set> then the problem should not occur. regards Jan
        Hide
        Jan Bartel added a comment -
        Show
        Jan Bartel added a comment - Really another manifestation of https://bugs.eclipse.org/bugs/show_bug.cgi?id=364936

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Kelly Davis
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: