I recently just noticed that the auto deploy functionality of my servlet
container is not working because the struts.jar is locked. The auto-deploy
functionality basically deletes any existing files under the target
directory and unpacks the  war file into the target directory, thereby
making deployment rather easy. The unfortunate thing is, when you attempt to
reload the web app, the target directory cannot be deleted because the
struts.jar file is locked.

At first I thought it was my web app. Then I tried it with the
struts-example.war web app and it exibited the same behavior.

I don't see this behavior on my production machine, only during development
and staging (which both are behind a fire wall; no-proxy server is used).


The behavior seems to the result of the Digester resolving the location of
DTDs to the local jar file. From the code, it it looks like it happens when
the Digester must resolve to an alternate DTD. In this case it uses an URL
object to open up a stream to the local resource thereby locking the
struts.jar file. It doesn't appear to exhibit this behavior when the
publidId is not registered and it must use the system identifier.


This is printed out when I see the behavior:

[Sat May 04 10:51:54 EDT 2002] register('-//Apache Software Foundation//DTD
Struts Configuration 1.0//EN',
'jar:file:///F:\cvsroot\web\apps\company\www\WEB-INF\lib\struts.jar!/org/apa
che/struts/resources/struts-config_1_0.dtd'
[Sat May 04 10:51:54 EDT 2002] register('-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN',
'jar:file:///F:\cvsroot\web\apps\company\www\WEB-INF\lib\struts.jar!/org/apa
che/struts/resources/web-app_2_2.dtd'
[Sat May 04 10:51:54 EDT 2002] register('-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN',
'jar:file:///F:\cvsroot\web\apps\company\www\WEB-INF\lib\struts.jar!/org/apa
che/struts/resources/web-app_2_3.dtd'
[Sat May 04 10:51:56 EDT 2002] resolveEntity('-//Apache Software
Foundation//DTD Struts Configuration 1.0//EN',
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
[Sat May 04 10:51:56 EDT 2002]  Resolving to alternate DTD
'jar:file:///F:\cvsroot\web\apps\company\www\WEB-INF\lib\struts.jar!/org/apa
che/struts/resources/struts-config_1_0.dtd'


This is printed out when I don't see the behavior:

[Fri May 03 09:43:38 CDT 2002] resolveEntity('-//Apache Software
Foundation//DTD Struts Configuration 1.0//EN',
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
[Fri May 03 09:43:38 CDT 2002]  Not registered, use system identifier


I searched the archives under "Digester" and could not find anything
pertinent over 804 hits. I may have missed something though.

Any help would be greatly appreciated.


robert


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to