users@glassfish.java.net

Re: Cannot deploy using Eclipse plugin. Jar file May be locked by another process

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Fri, 27 Nov 2009 12:28:36 -0800

Vincent Deschênes wrote:
> If you have an application with jar file in the lib directory that are used by your application the publish will always fail (except
> for the first time).
> The only solution is to restart your server.
>
> So when your server is running, each time you save a file the plugin will try to publish it and will fail whith an error like this :
>
> Could not delete C:\glassfishv3\glassfish\domains\domain1\eclipseApps\....jar. May be locked by another process.
>
> If there is no file in your EarContent\lib or WEB-INF\lib folder there is no problem.
>
> I am using the pluging version 1.0.41 on Eclipse 3.4.1 and latest glassfish V3 on Windows.
>
>
> I can not beleive a bug like this can exist for that long.
> This is why I am asking out what solution users found to this problem.
>
> I have found an unresolved issue here:
> https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=219
>
The process which lock the files is the server, not Eclipse or the plugin.
It is usually related to external frameworks that keep files locked (no
cleaning at undeploy time), not GlassFish itself.
Try http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish
http://blogs.sun.com/quinn/entry/addressing_locked_jar_problems
Ludo
>
> Thanks.
>
> Vincent Deschenes
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>