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)
- Delete repository folder from .m2 folder : rm -r ~/.m2/repository
- Add any local jars you may have added to repository
- From AppFuse project folder, run : mvn:jetty-run
OR,
- Find the offending jar from the exception stacktrace.
- Delete the folder containing the jar inside ~/.m2/repository
- Run “mvn install” or mvn:jetty-run.

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.