Error: Zip64 archives are not supported by springframework

Springboot application may fail to start with error "Zip64 archives are not supported" with giving you stack trace as below.
  
Caused by: java.lang.IllegalStateException: Zip64 archives are not supported
    at org.springframework.boot.loader.jar.CentralDirectoryEndRecord.getNumberOfRecords(CentralDirectoryEndRecord.java:124)
    at org.springframework.boot.loader.jar.JarFileEntries.visitStart(JarFileEntries.java:91)
    at org.springframework.boot.loader.jar.CentralDirectoryParser.visitStart(CentralDirectoryParser.java:89)
    at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(CentralDirectoryParser.java:57)
    at org.springframework.boot.loader.jar.JarFile.(JarFile.java:121)
    at org.springframework.boot.loader.jar.JarFile.(JarFile.java:109)
    at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:287)
    at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:262)
    at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:250)
    ... 6 more

The main reason is "Springboot loader does not support Zip64 format jar's. You can find excellent details about the error at here.
In order to resolve this error, you need to check which Jar is built with Zip64 format. Once you locate the file which is built with Zip64, try to reduce the no of files in that jar to less than 65535, so that it will get build without Zip64. Once you fix this, your application will start working.

No comments:

Post a Comment

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...