简体   繁体   中英

Error when building once built java web project?

When I run for the first time there doesn't show any errors and I did double check the code and there is no error, but once again when I build the file again the following error pops up.

Deleting directory C:\Users\Vbabey\Documents\NetBeansProjects\PersistenceMYEX2\build C:\Users\Vbabey\Documents\NetBeansProjects\PersistenceMYEX2\nbproject\build-impl.xml:1054: Unable to delete file C:\Users\Vbabey\Documents\NetBeansProjects\PersistenceMYEX2\build\web\WEB-INF\lib\toplink-essentials-agent.jar

I cannot understand the reason for the above error? Can anybody explain me what it is?

Based on your comments, you are running into the default windows locking behavior. If you have a jar file open to run an application, you can't overwrite it.

You might be building it when the server is on. Some other application is using your files. Try switching off the server or other applications that may be using the files.

A quick fix can be to export the project and import it with a different name and then you can build it.

  1. Simply stop the tomcat or kill the java.exe process before building again.

  2. Secondly, I believe you're using Clean & Build option, which does create issue, when the project is already running. Instead just use the build option or run option in case you want to run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM