开发者

Is there any solution for this annoying error?

开发者 https://www.devze.com 2023-03-12 14:43 出处:网络
I am using NetBeans 7.0 and Glassfish 3.1 with Spring, version 3.0.2 and often I receive er开发者_StackOverflow中文版rors like this one:

I am using NetBeans 7.0 and Glassfish 3.1 with Spring, version 3.0.2 and often I receive er开发者_StackOverflow中文版rors like this one:

"someProjectName\nbproject\build-impl.xml:1060: Unable to delete file SomeProjectname\build\web\WEB-INF\lib\antlr-2.7.6.jar"

Anyone have any ideas what could be the cause for this?


It is a not a bug, It may happen due to a number of reasons:

  1. the jar is still executing.(in memory)
  2. Some page is open which is using the jar.
  3. The explorer window containing the folder which contains the jar is open.

There may be other reasons too...but I solved the problem on more than one occasions by eliminating the above three conditions.

See if it works for u.


On top of what of knurdy's suggested... You might find Unlocker a helpful tool in such problem. Only if you are working on Microsoft Windows platform, which I guess you do.


  1. Close the NetBeans
  2. Stop the AppServer (I use GlassFish)
  3. Start NetBeans
  4. Clean and Deploy
  5. Start AppServer

It works.


Seems like the file is loaded on the server and hence been currently used. You just have to stop the server > clean or clean and build your project and it will be removed. No need to close Netbeans or kill java.exe.


If you are using Windows. Go to task manager-->Processes and Kill java.exe process there. it will solve the problem if that jar is still running in memory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号