Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Enter a short symptom description here

A ZIP exception is thrown when a jar or war file is accessed.

Detailed Description

The JVM maintains a cache of ZIP file indexes and they do not support hot replacement of
zip files. Thus if a web application is redeployed and the same war or jar files are used
then the cache will cause exceptions when re-reading the jars.

See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4774421

Remedy

The remedy is to avoid hot replacing jar or war files - which can be difficult if using the hot context deployer. The following techniques can be used to reduce exposure to this issue:

  1. Deploy unpacked classes in WEB-INF/classes directory rather than as a jar file under WEB-INF/lib
  2. Deploy all war and jar files with a version number in their filename or path. If the code is changed then a new version number is used and the cache problem avoided.
  3. Deploy a packed war file with the setExtractWAR option set to true. This will cause the WAR to be extracted to a temporary directory and thus to a new location. This technique will not work if a work directory is being used.
  4. Deploy an unpacked war file with the setCopyWebDir option set to true. This will cause the directory to be extracted to a temporary directory and thus to a new location. This technique will not work if a work directory is being used.
  • No labels
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery