Looks like I am not alone in this. Please see:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6399836

-Prashant

On Tue, 2007-05-15 at 20:43 +0530, Prashant Reddy wrote:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6457007
> 
> Reproduction:
> 1. Build DOM of an XML whose XSD is locally resolved to a JAR file. 
> 
> Although the bug in the Sun's database seems to suggest this issue goes
> away if one employs 2.8 version of Xerces, my experience has been the
> contrary. 
> 
> In my deployment scenario i have used endorsed.dirs and overrode the
> bundled xerces implementation with 2.8 and the problem outlined in the
> bug description quoted above still remains.
> 
> If the JAR containing the XSD is part of WEB-INF/lib of a application
> such locking of jar may result in failure to clean-up when you undeploy
> the application from a Servlet container.
> 
> Also nothing in the current code[1] seem to suggest the bug is resolved
> as yet ?
> 
> I cannot think of what the solution can be though, since URLConnection
> does not have any close()/disconnect() method that actually calls the
> ZipFile's close() method.
> 
> The stack trace which opens the Jar File containing the XSD is the
> following :
> 
>      java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:134)
>      java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:70)
>  sun.net.www.protocol.jar.URLJarFile.<init>(sun\net\www\protocol\jar
> \URLJarFi
>  le.java:56)
>  sun.net.www.protocol.jar.URLJarFile.getJarFile(sun\net\www\protocol\jar
> \URLJ
>  arFile.java:41)
>  sun.net.www.protocol.jar.JarFileFactory.get(sun\net\www\protocol\jar
> \JarFile
>  Factory.java:63)
>  sun.net.www.protocol.jar.JarURLConnection.connect(sun\net\www\protocol
> \jar\J
>  arURLConnection.java:85)
>  sun.net.www.protocol.jar.JarURLConnection.getInputStream(sun\net\www
> \protoco
>  l\jar\JarURLConnection.java:107)
>  org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(-unknown-:-1)
>      org.apache.xerces.impl.XMLEntityManager.startEntity(-unknown-:-1)
>  org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(-unknown-:-1)
>  org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(-unknown-:-1)
> 
> org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(-unknown-:-1)
> 
> org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(-unknown-:-1)
>      org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(-unknown-:-1)
>  org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(-unknown-:
>  -1)
>  org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(-unknown-:-1)
>      org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(-unknown-:-1)
>  org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(-unknown-:-1)
> 
>  org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(-unknown-:-1
>  )
>  org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(-unknown-:-1)
>  org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(-unknown-:-
>  1)
>  org.apache.xerces.impl.XMLNSDocumentScannerImpl
> $NSContentDispatcher.scanRoot
>  ElementHook(-unknown-:-1)
>  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> $FragmentContentDispatc
>  her.dispatch(-unknown-:-1)
>  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(-unknown-
>  :-1)
>      org.apache.xerces.parsers.XML11Configuration.parse(-unknown-:-1)
>      org.apache.xerces.parsers.XML11Configuration.parse(-unknown-:-1)
>      org.apache.xerces.parsers.XMLParser.parse(-unknown-:-1)
>      org.apache.xerces.parsers.DOMParser.parse(-unknown-:-1)
>      org.apache.xerces.jaxp.DocumentBuilderImpl.parse(-unknown-:-1)
>      javax.xml.parsers.DocumentBuilder.parse(-unknown-:-1)
> 
> Thank you for your time.
> 
> [1]
> http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/XMLEntityManager.java?view=markup



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

Reply via email to