Free Support Forum -

Build servlet example and invalid CEN header (bad signature)



Tried to build example application for servlet and stuck with error like invalid CEN header (bad signature):

D:\dev\web-viewer>ant war
Buildfile: D:\dev\web-viewer\build.xml

[echo] Cleaning the build
[delete] Deleting directory D:\dev\web-viewer\build
[echo] Cleaning the dist
[echo] Cleaning the out

[echo] Creating the build directory
[mkdir] Created dir: D:\dev\web-viewer\build\WEB-INF\classes
[mkdir] Created dir: D:\dev\web-viewer\build\WEB-INF\lib

[echo] Compile the source files
[javac] D:\dev\web-viewer\build.xml:26: warning: ‘includeantruntime’ was not set, defaul
ting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 20 source files to D:\dev\web-viewer1\build\WEB-INF\classes
[javac] error: error reading C:\Users\Andrey.m2\repository\com\groupdocs\groupdocs-viewer\2.6.0
\groupdocs-viewer-2.6.0.jar; invalid CEN header (bad signature)
[javac] 1 error

D:\dev\web-viewer\build.xml:26: Compile failed; see the compiler error output for details.

Hello Andrey,

From the log you provided, it seems that the groupdocs-viewer-2.6.0.jar file in your maven repository is corrupted. Try to redownload it from the GroupDocs archive and install it again using command provided here:

I tried to build servlet example from the provided samples archive and everything builds fine, the only thing I had to change is configuration and add this line
to the directory.


Hi Ihor,

Redownloaded several times and went through install instruction provided from link and the same issue.
Also tried:> jar tvf GroupDocs.Viewer.jar invalid CEN header (bad signature)

thought 2.5.0 version works fine.


Steps to reproduce:
1)download from link:
2) unzip file
3) go to lib dir
4) run: jar tvf GroupDocs.Viewer.jar
Getting error: invalid CEN header (bad signature)
at Method)

Thank you for the provided info Andrey,

Please, check if the size of the archive is near 99,7Mb. Also here I provide checksums for archive and the jar itself.
  • MD5: c9a2dc8e5786c4f5cd83e5fd18d3b149
  • SHA1: 24d47cae4f689f883c2a446ec961b7b585aa6a5e
  • MD5: 6e02645cf36f92e4655f766b72fbba96
  • SHA1: 0c6e689d09494ac5a7de3cc2debdd066e380d1a2
Maybe there is problem with downloading the archive. Can you give more details about your environment?


I tried to build with java 6 and got the error. I switched to java 7(jdk1.7.0_67) and now it works fine. Looks like zip-64 support was apparently only added in 1.7.0_b55


Glad to see that the problem is fixed now.