(Re)Deployment Problems of EARs with Netbeans 6.0 and Glassfish v2 ...and the solution

I'm working with Windows Vista (it needs for booting several minutes and at least 1GB RAM...:-( ) and I encounter some problems with the redeployment of Enterprise Applications (with EJB 3 and Visual Web Pack) on this platform. The deployment process stops, you should see in the deployment console something like this:

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 :-).

Comments:

incremental deployment of EARs has to be refined - I'm already looking forward to Netbeans 6.1

--> just because Windows sucks? I also have this problem regularly...i then undeployed the application...
however...i am now really looking forward to my new MacBookPro..are there any experiences considering this problem with "Tiger"-OS or "Leopard"?

Posted by Daniel on January 01, 2008 at 09:02 PM CET #

I didn't observed anything on a MacBookPro - it should work (with Java 5) :-). However without incremental deployment it works really well. The performance is o.k. as well...

Posted by Adam Bien on January 01, 2008 at 09:47 PM CET #

Thanks Adam,
as long as i still work with Windows, i ll disable this feature...
bye the way...god nytt år (greetings from Göteborg, Sweden..)

Posted by daniel on January 02, 2008 at 12:03 AM CET #

Hi Adam,
http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish
If the problem is lock-related, have you used this tool to diagnose the problem?
thanks.

Posted by Alexis MP on January 11, 2008 at 12:00 PM CET #

Thanks man ... this problem was getting on my nerves.

Posted by Andres Giraldo on April 15, 2010 at 02:51 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License