AppFuse jetty:run throws error “ZipException: invalid distance too far back”

Problem: When running mvn jetty:run to launch jetty, Appfuse throws error “java.util.zip.ZipException: invalid distance too far back”

Reason: One of the jars in maven repository is corrupted.

Fix: (Kind of nuke all, but works)

  1. Delete repository folder from .m2 folder : rm -r ~/.m2/repository
  2. Add any local jars you may have added to repository
  3. From AppFuse project folder, run : mvn:jetty-run

OR,

  1. Find the offending jar from the exception stacktrace.
  2. Delete the folder containing the jar inside ~/.m2/repository
  3. Run “mvn install” or mvn:jetty-run.
Kj
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *