Jetty - java.lang.IllegalStateException: zip file closed

前端 未结 6 1275
难免孤独
难免孤独 2021-01-12 05:05

I\'m getting some error with some connection to our web server.

I saw that a bug causing this was solved in Jetty 7.6. Yes we get this error on our application runn

6条回答
  •  甜味超标
    2021-01-12 05:39

    There are 2 main causes for this.

    1. A bad/corrupt JAR file in your classpath.
    2. The JVM built-in URL caching getting in the way.

    For a bad/corrupt JAR file, you'll have to isolate that on your own, figure out which one it is. Maybe by just unjaring all of them one by one till you find the problematic one.

    As for the JVM URL caching, this seems to cause problems with dynamic classloaders like OSGi or hot-deploy scenarios the most.

    For this scenario, you can tell jetty to set the URLConnection.setUseCaches(boolean) for each URLConnection attempt of its own.

    To disable the JVM caches, add the following snippet of XML to your etc/jetty.xml

    false
    

提交回复
热议问题