Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] IllegalStateException - zip file closed

I randomly get the following exception with Jetty 7.4.5. For example, if I refresh the same page a number of times it will be OK then I will get the exception.

I have attached my jetty XML.

Any ideas on what the root cause could be? Please let me know if there is any more information I can provide to help debug this.

Thanks,
Mark

WARN  Oct 04 12:11:59 (148428 [qtp1436400732-310] org.eclipse.jetty.util.log) /resources/css/nostyle.css
     [java] java.lang.IllegalStateException: zip file closed
     [java] at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416)
     [java] at java.util.zip.ZipFile.access$100(ZipFile.java:31)
     [java] at java.util.zip.ZipFile$2.hasMoreElements(ZipFile.java:316)
     [java] at java.util.jar.JarFile$1.hasMoreElements(JarFile.java:222)
     [java] at org.eclipse.jetty.util.resource.JarFileResource.exists(JarFileResource.java:161)
     [java] at org.eclipse.jetty.webapp.WebAppContext.getResource(WebAppContext.java:316)
     [java] at org.eclipse.jetty.webapp.WebAppContext$Context.getResource(WebAppContext.java:1217)
     [java] at org.eclipse.jetty.servlet.DefaultServlet.getResource(DefaultServlet.java:362)
     [java] at org.eclipse.jetty.server.ResourceCache.lookup(ResourceCache.java:185)
     [java] at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:441)
     [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
     [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
     [java] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
     [java] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)
     [java] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
     [java] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)
     [java] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
     [java] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
     [java] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
     [java] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
     [java] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
     [java] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
     [java] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
     [java] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
     [java] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
     [java] at org.eclipse.jetty.server.Server.handle(Server.java:346)
     [java] at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
     [java] at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
     [java] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
     [java] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
     [java] at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
     [java] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
     [java] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
     [java] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
     [java] at java.lang.Thread.run(Thread.java:662)
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd";>

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  
  <!-- =========================================================== -->
  <!-- Override max form size as PDC output streams were > default -->
  <!-- =========================================================== -->

  <Call class="java.lang.System" name="setProperty">
    <Arg>org.eclipse.jetty.server.Request.maxFormContentSize</Arg>
    <Arg>500000</Arg>
  </Call>

  <!-- =========================================================== -->
  <!-- Server Thread Pool                                          -->
  <!-- =========================================================== -->
  
  <Set name="ThreadPool">
    <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
      <Set name="minThreads">10</Set>
      <Set name="maxThreads">200</Set>
    </New>
  </Set>
  
  <!-- =========================================================== -->
  <!-- Set connectors                                              -->
  <!-- =========================================================== -->
  
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
        <Set name="host">
          <SystemProperty name="jetty.host" />
        </Set>
        <Set name="port">
          <SystemProperty name="jetty.port.ssl" default="24721"/>
        </Set>
        <Set name="maxIdleTime">30000</Set>
        <Set name="Acceptors">2</Set>
        <Set name="statsOn">false</Set>
        <Set name="lowResourcesConnections">5000</Set>
        <Set name="lowResourcesMaxIdleTime">5000</Set>
        <Set name="keystore"><SystemProperty name="conf.dir" default="." />/keystore</Set>
        <Set name="password">[omitted]</Set>
        <Set name="keyPassword">[omitted]</Set> 
      </New>
    </Arg>
  </Call>
  
  <!-- =========================================================== -->
  <!-- Set handler Collection Structure                            -->
  <!-- =========================================================== -->
  
  <Set name="handler">
    <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
      <Set name="handlers">
        <Array type="org.eclipse.jetty.server.Handler">
          <Item>
            <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection" />
          </Item>
          <Item>
            <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
          </Item>
          <Item>
            <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
          </Item>
        </Array>
      </Set>
    </New>
  </Set>
  
  <!-- =========================================================== -->
  <!-- Configure the webapp deployer.                              -->
  <!-- =========================================================== -->
  
  <Call name="addLifeCycle">
    <Arg>
      <New class="org.eclipse.jetty.deploy.WebAppDeployer">
        <Set name="contexts">
          <Ref id="Contexts"/>
        </Set>
        <Set name="webAppDir">
          <SystemProperty name="webapps.ssl.dir"/>
        </Set>
        <Set name="parentLoaderPriority">false</Set>
        <Set name="extract">false</Set>
        <Set name="allowDuplicates">false</Set>
      </New>
    </Arg>
  </Call>
  
  <!-- =========================================================== -->
  <!-- Configure Request Log                                       -->
  <!-- =========================================================== -->
  
  <Ref id="RequestLog">
    <Set name="requestLog">
      <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
        <Set name="filename">
          <SystemProperty name="log.dir" default="."/>/yyyy_mm_dd.request.log</Set>
        <Set name="filenameDateFormat">yyyy_MM_dd</Set>
        <Set name="retainDays">7</Set>
        <Set name="append">true</Set>
        <Set name="extended">true</Set>
        <Set name="logCookies">false</Set>
        <Set name="LogTimeZone">GMT</Set>
        <Set name="ignorePaths">
          <Array type="java.lang.String">
            <Item>/pdc/input/control</Item>
          </Array>
        </Set>
      </New>
    </Set>
  </Ref>
  
  <!-- =========================================================== -->
  <!-- Extra options                                               -->
  <!-- =========================================================== -->
  
  <Set name="stopAtShutdown">true</Set>
  <Set name="sendServerVersion">true</Set>
  <Set name="sendDateHeader">true</Set>
  <Set name="gracefulShutdown">1000</Set>
</Configure>

Back to the top