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.
Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.