Is there any solution for this annoying error?
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:
- the jar is still executing.(in memory)
- Some page is open which is using the jar.
- 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.
- Close the NetBeans
- Stop the AppServer (I use GlassFish)
- Start NetBeans
- Clean and Deploy
- 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.
精彩评论