ZipException: invalid distance too far back when starting the application

I have a GWT application that uses Resteasy as a backend api / service, the project works correctly, but when I move the project to another computer and run it, I get this error when running GWT:

Caused by: java.util.zip.ZipException: invalid distance too far back at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164) at java.util.zip.ZipInputStream.read(ZipInputStream.java:193) at java.util.jar.JarInputStream.read(JarInputStream.java:207) at org.scannotation.archiveiterator.InputStreamWrapper.read(InputStreamWrapper.java:36) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at java.io.DataInputStream.readInt(DataInputStream.java:387) at javassist.bytecode.ClassFile.read(ClassFile.java:731) at javassist.bytecode.ClassFile.<init>(ClassFile.java:108) at org.scannotation.AnnotationDB.scanClass(AnnotationDB.java:343) at org.scannotation.AnnotationDB.scanArchives(AnnotationDB.java:326) at org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.createDeployment(ConfigurationBootstrap.java:163) ... 24 more 

What could be the problem?

  • Are banks GWT or Resteasy? What does ZipException mean? Does this mean a corrupt addiction?
+4
source share
4 answers

I'm going to go limb here and say that you have a class compatibility error or corrupted Jars (look at the call stack, it is trying to load classes from jar files).

Make sure you have the same version of Java on both systems, and then COPY the entire project from the work host to the down host. Perhaps you have a damaged Jar.

Basically make sure everything is identical and try again.

+5
source

Sometimes your firewall interrupts the ftp connection, so try to keep the exception for java 7 on your firewall. On Windows 7, this is:

 netsh advfirewall set global statefulftp disable 

Do this by running the command line as an administrator.

+2
source

Mostly my project is hosted at Bitbucket. Therefore, I created a folder that will serve as the new workspace folder. Then there is a git clone project. Then issue mvn clean install and mvn gwt: run, then everything will be fine.

+1
source

I don’t know if your problem was the same, but I ran into the same error and found out that it was related to Firefox version> 10.0. For some reason, Firefox will convert any "!" character into something like "% 21".

In my scenario, my application caused this error when rendering an image due to this fact. The same thing didn't happen in Chrome.

This situation can be resolved by implementing a filter to process the request.

If this case matches your problem, check out this post: javax.faces.FacesException: Error decoding resource data when loading JSF page

0
source

Source: https://habr.com/ru/post/1481234/


All Articles