You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/03/19 18:56:53 UTC
DO NOT REPLY [Bug 18153] New: -
DTD validation errors leave XML file locked
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18153>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18153
DTD validation errors leave XML file locked
Summary: DTD validation errors leave XML file locked
Product: Xerces2-J
Version: 2.3.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: javacrypto@yahoo.com
If an error occurs with when validating a DTD, parsing stops, but the XML file
that was being read remains open and locked, so it cannot be edited or moved.
To reproduce this, open the XML file with a text editor, and point the DTD to a
file you know does not exist. When I do this, my error handler correctly
reports the missing DTD, but the file remains locked until the VM exits. In my
case, the VM is a web server, so I cannot fix or move the file until the web
server restarts.
I tried to fix the problem by re-throwing the exception in the error handler,
but this had no effect.
A possible work-around for this would be to launch the parsing in a separate
VM, but that sounds messy and unnecessary. It would be better to close the file
in a finally block or something.
This happened in older versions of Xerces too. See bug #8053 for Xerces-J:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8053
This probably happens on other platforms besides Win2K, but I can't test them.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org