Error: Archive for required library cannot be read or is not a valid ZIP file.

谁说我不能喝 提交于 2019-12-05 02:12:22

I Had this issue, just fixed by deleting .jar files from Libs directory then copy->paste original Jars again. Then do a complete clean -> rebuild

I got this problem, took help from following link solution which basically says to 1. delete the corresponding maven download folder 2. maven>update project in eclipse

In my case I deleted hibernate folder, since i was getting error related to hibernate-validator.jar

I had the same error here. What I did to resolve the problem was close and reopen the project.

I got the same problem and found out the root cause is the JDK in my linux shell is set to 1.6, but in the eclipse, the JRE is 1.7.

Basilevs

Using Eclipse without m2e features (Standard Edition) helped me.

Similar problem with Spring toolsuite

Just came across this link that shows a way to get unblocked. In preferences dialog box go to

Java->Compiler->Building

and change Incomplete build path to "Warning" (from default "Error") This can be done globally (for all projects), or on a project by project basis.

Check the jar's file permissions/ownership. I had the same issue on eclipse installed on Linux and fixed it by setting the file permissions right.

In my case ..worked after removing this from spirngrest-servlet.xml file.

    <prop key="net.sf.ehcache.configurationResourceName">/Sysehcache.xml</prop>

I think it had to do with default location of maven repository of jar files. Been at it for 3 days. finally solved it.Hope it helps anyone.Just look for similar think in your spirngrest-servlet.xml file. Good luck.

I just tried the following and it worked:

Close eclipse as there might be some files eclipse is accessing and you won't be able to delete.

Delete all the libraries installed in the maven repositories folder: ".m2/repository"

Open eclipse and update your project(Alt+F5).

What did we just do? : This is possible that the existing libraries in the local repository are erroneous and maven tries to open which it fails in. We have now deleted the already existing library and with the project update, Maven will download the library again which should resolve the issue.

i fixed this by just deleting everything inside of the /Users/username/.m2/repository folder. not the repository folder itself. and then running a mvn clean package in the project folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!