The compiling environment is different from the JDK version of the build environment. The following error is reported: java.util.zip. zipexception: Error in opening ZIP file.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.