When publishing an application, the production environment reports that the war package compiled in the compiling environment is taken to the production environment, and an exception is reported as follows:
Caused by: java.util.zip. zipexception: Error in opening ZIP file at java.util.zip. zipfile. open (native method) at java.util.zip. zipfile. <init> (zipfile. java: 127) at java. util. jar. jarfile. <init> (jarfile. java: 135) at java. util. jar. jarfile. <init> (jarfile. java: 72) at sun.net. www. protocol. jar. urljarfile. <init> (urljarfile. java: 72) at sun.net. www. protocol. jar. urljarfile. getjarfile (urljarfile. java: 48) at sun.net. www. protocol. jar. jarfilefactory. get (jarfilefactory. java: 70)
First, it is confirmed that the war package is good, because it can run in a test environment, it indicates that the environment has encountered a problem. After investigation, it is found that the JDK version of the compiling environment is 1.6.18, the JDK version of the production environment is 1.6.25. If the JDK version of the compiling environment is the same as that of the production environment, no error is reported and the program runs properly.
This article is from:Feng Libin's blog