[
https://issues.apache.org/jira/browse/XERCESJ-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445774#comment-13445774
]
Octavian Nadolu commented on XERCESJ-1578:
------------------------------------------
The fix is not so good. When you compare the system ids of the files you should
use "equal" method instead of "==". Also make sure that the both system ids are
expanded when you compare them.
Anyway, the problem can be reproduced if I validate the main.xsd file from the
following sample:
main.xsd
--------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="include.xsd"/>
</xs:schema>
--------------------------
include.xsd
-----------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="main.xsd"/>
<xs:override schemaLocation="main.xsd"/>
</xs:schema>
-----------------------
> Stack overflow when validating schema with emtpy @href in <override>
> --------------------------------------------------------------------
>
> Key: XERCESJ-1578
> URL: https://issues.apache.org/jira/browse/XERCESJ-1578
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.11.0
> Reporter: Radu Coravu
> Assignee: Mukul Gandhi
>
> When validating with XML Schema 1.1 support the following schema:
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xs:include schemaLocation="testSimple.xsd"/>
> <xs:override schemaLocation=""/>
> </xs:schema>
> which references a very simple schema "testSimple.xsd":
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"> </xs:schema>
> I obtain a stack overflow:
> java.lang.StackOverflowError
> at java.net.URLStreamHandler.setURL(URLStreamHandler.java:516)
> at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:288)
> at sun.net.www.protocol.file.Handler.parseURL(Handler.java:50)
> at java.net.URL.<init>(URL.java:596)
> at java.net.URL.<init>(URL.java:464)
> at java.net.URL.<init>(URL.java:413)
> at ro.sync.util.URLUtil.clearUserInfo(URLUtil.java:434)
> at
> ro.sync.xml.catalogresolver.ExtendedCatalogResolver.debugResolve(ExtendedCatalogResolver.java:171)
> at
> ro.sync.xml.catalogresolver.ExtendedCatalogResolver.resolveEntity(ExtendedCatalogResolver.java:136)
> at
> ro.sync.xml.catalogresolver.CatalogEntityResolver.resolveEntity(CatalogEntityResolver.java:69)
> at
> ro.sync.xml.catalogresolver.DelegatingXMLEntityResolver.resolveEntity(DelegatingXMLEntityResolver.java:151)
> at
> org.apache.xerces.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:710)
> at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown
> Source)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.resolveSchemaSource(XSDHandler.java:2297)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1163)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1224)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1224)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1224)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1224)
> at
> org.apache.xerces.impl.xs.traversers.XSDHandlerXerces.constructTrees(XSDHandler.java:1224)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]