users@glassfish.java.net

Re: Redeploy fails when using Struts with GlassFish

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Tue, 12 Dec 2006 11:44:27 -0800

jacob_at_hookom.net wrote:
> It might be an issue to throw back at Struts or another dependent library that uses resources from the classpath-- I had the same problem with my project and ended up having to re-work closing URLConnections on the classpath.
>
>
One of the culprits for Struts (and several other frameworks) is
actually Commons Digester, which is often told to reference DTDs that
are embedded as classpath resources. Version 1.8 of Commons Digester
was just released, and includes fixes for at least this scenario ...
it's worth trying (although it might not address all file locking
issues, it will certainly address some of them).

There are additional Struts-specific issues that are related to which
version of Struts you are using. IIRC, these were addressed in 1.2.8 or
later.

Craig
> One of the culprits was code to check the lastModified date of resources on the classpath, it will end up locking the resource, so you have to grab an inputstream and immediately close it to guarantee you've freed the lock.
>
>
>> I have an EAR that contains the Struts JARs. When I modify the app and
>> try to redeploy, it always fails because of file locks on the Struts
>> JARs. To redeploy, I have to shut down GlassFish, manually delete the
>> app from the domain, restart, and redeploy.
>>
>> Has anyone else run into a similar problem with Struts or anything
>> else? What is the solution? Its painful to try to develop for
>> GlassFish if you have to keep shutting down the server in order to redeploy.
>>
>> Thanks,
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>