Error during incremental deploy: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot delete file dojo-0.9.0.jar in C:/work/workspaces/javaee5patterns/RunAndBikeApplication/dist/gfdeploy.
...and then:
Deployment error:
null
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
It seems like windows locks some files, so Netbeans isn't able to
delete them during redeployment. After restarting Glassfish (and unlocking so the files), I was able to deploy the app without problems. However this problem only happens on
windows. On Linux it works just fine. The error is also somehow related with the incremental deployment - which can be easily disabled.
To disable this "feature", go to the Tab "Services", choose the Glassfish V2 icon, "Properties" from the context menu (right click), then go to the Tab Options. After disabling the check box "Directory Deployment Enabled" the redeployment should work. I'm actually working on some Java EE Applications (RunAndBikeDB is one of them) for several days without restarting Netbeans, Glassfish or even rebooting Windows. It just works perfectly. The deployment performance is absolutely o.k. It seems like the incremental deployment of EARs has to be refined - I'm already looking forward to Netbeans 6.1 :-).