Maven:: Invalid CEN (bad signature) Invalid LOC (bad signature)
So, you are here, and I guess you are having a tough time trying to figure out what that error is. I’d spent almost three days trying to figure out what this crazy error is, but then decided to not waste time and deleted my Maven repository folder at ~/.m2/repository.
I assume that, this is some bug in maven, but this also pops up in several other projects like Apache Tomcat, Atlassian Confluence etc. The error comes up randomly and developers spent a great portion of their fruitful work time, just to figure out whats going wrong. And most of the time it is not their fault.
This error comes up randomly and means that one of the jar file in the project class path is corrupt. A practical solution is to replace the jar files with new ones freshly downloaded.
This crazy error show up when the JVM thinks that the jar file it is accessing is corrupt. So I assumed if I delete the dependency jar files and download them again, it might solve the problem.
|
|
This deletes all files from ~/.m2/repository/ first and then, mvn test
will download all dependent jar files before building the project and running junit tests. It took a while for Maven to download all my dependencies, but was worthwhile. The project is back in action!!!
If you are not using Maven or any other dependency management tool, you may try downloading the required jar files again, may be from a different source, if the file in that source is corrupted.
This error may also come up when checking out from repository.
Author: Deepu Mohan Puthrote
Link: https://deepumohan.com/tech/maven-invalid-cen-bad-signature-invalid-loc/
This work by Deepu Mohan Puthrote is licensed under a Creative Commons Attribution 4.0 International License