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 "Radu Coravu (JIRA)" <xe...@xml.apache.org> on 2012/07/12 12:46:35 UTC

[jira] [Created] (XERCESJ-1570) Stack overflow when validating XML with XML Schema (using 1.1)

Radu Coravu created XERCESJ-1570:
------------------------------------

             Summary: Stack overflow when validating XML with XML Schema (using 1.1)
                 Key: XERCESJ-1570
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1570
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema 1.1 Datatypes
    Affects Versions: 2.11.0
            Reporter: Radu Coravu
             Fix For: 2.11.0


The XML is like:

<?xml version="1.0" encoding="UTF-8"?>
<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="personal.xsd">
    <person  xsi:type="testType"></person>
</personnel>


The XML Schema is like:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="testType"/>
    <xs:element name="personnel">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="person" minOccurs="1" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="fidji">
        <xs:attribute name="attr"/>
    </xs:complexType>
    <xs:element name="person" type="fidji"/>    
</xs:schema>


The schema is parsed as an XML Schema 1.1 and then used to validate the XML.

The stack overflow is like:

java.lang.StackOverflowError
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:216)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)


at org.apache.xerces.impl.xs.XSConstraints.checkTypeDerivationOk(XSConstraints.java:118)
	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.getAndCheckXsiType(XMLSchemaValidatorXerces.java:2959)
	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2252)
	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:963)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)

I added some logging in XSConstraints, it has some recursive code like:

 if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
            return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);

which could be guarded to be something like:

if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE 
            && directBase != derived
            )

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1570) Stack overflow when validating XML with XML Schema (using 1.1)

Posted by "Radu Coravu (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414868#comment-13414868 ] 

Radu Coravu commented on XERCESJ-1570:
--------------------------------------

I think that the error appears because the XML Schema is parsed as 1.1 but then the XML is validated with it as if it was an 1.0 schema.
If you cannot reproduce it, it's OK. You can close it and when we'll update the tested Xerces I will post a new bug if it is still encountered.

                
> Stack overflow when validating XML with XML Schema (using 1.1)
> --------------------------------------------------------------
>
>                 Key: XERCESJ-1570
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1570
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The XML is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:noNamespaceSchemaLocation="personal.xsd">
>     <person  xsi:type="testType"></person>
> </personnel>
> The XML Schema is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xs:complexType name="testType"/>
>     <xs:element name="personnel">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element ref="person" minOccurs="1" maxOccurs="unbounded"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:complexType name="fidji">
>         <xs:attribute name="attr"/>
>     </xs:complexType>
>     <xs:element name="person" type="fidji"/>    
> </xs:schema>
> The schema is parsed as an XML Schema 1.1 and then used to validate the XML.
> The stack overflow is like:
> java.lang.StackOverflowError
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:216)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> at org.apache.xerces.impl.xs.XSConstraints.checkTypeDerivationOk(XSConstraints.java:118)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.getAndCheckXsiType(XMLSchemaValidatorXerces.java:2959)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2252)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:963)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)
> I added some logging in XSConstraints, it has some recursive code like:
>  if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
>             return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
> which could be guarded to be something like:
> if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE 
>             && directBase != derived
>             )

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Resolved] (XERCESJ-1570) Stack overflow when validating XML with XML Schema (using 1.1)

Posted by "Mukul Gandhi (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi resolved XERCESJ-1570.
-----------------------------------

    Resolution: Cannot Reproduce

as per the suggestion from OP, resolving this issue.
                
> Stack overflow when validating XML with XML Schema (using 1.1)
> --------------------------------------------------------------
>
>                 Key: XERCESJ-1570
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1570
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The XML is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:noNamespaceSchemaLocation="personal.xsd">
>     <person  xsi:type="testType"></person>
> </personnel>
> The XML Schema is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xs:complexType name="testType"/>
>     <xs:element name="personnel">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element ref="person" minOccurs="1" maxOccurs="unbounded"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:complexType name="fidji">
>         <xs:attribute name="attr"/>
>     </xs:complexType>
>     <xs:element name="person" type="fidji"/>    
> </xs:schema>
> The schema is parsed as an XML Schema 1.1 and then used to validate the XML.
> The stack overflow is like:
> java.lang.StackOverflowError
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:216)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> at org.apache.xerces.impl.xs.XSConstraints.checkTypeDerivationOk(XSConstraints.java:118)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.getAndCheckXsiType(XMLSchemaValidatorXerces.java:2959)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2252)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:963)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)
> I added some logging in XSConstraints, it has some recursive code like:
>  if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
>             return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
> which could be guarded to be something like:
> if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE 
>             && directBase != derived
>             )

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Commented] (XERCESJ-1570) Stack overflow when validating XML with XML Schema (using 1.1)

Posted by "Mukul Gandhi (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414502#comment-13414502 ] 

Mukul Gandhi commented on XERCESJ-1570:
---------------------------------------

Are you using the published schema 1.1 beta? I can see the schema 1.1 SVN code base to be working fine, which gives the following message during validation,

cvc-elt.4.3: Type 'testType' is not validly derived from the type definition, 'fidji', of element 'person'.
                
> Stack overflow when validating XML with XML Schema (using 1.1)
> --------------------------------------------------------------
>
>                 Key: XERCESJ-1570
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1570
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>             Fix For: 2.11.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The XML is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:noNamespaceSchemaLocation="personal.xsd">
>     <person  xsi:type="testType"></person>
> </personnel>
> The XML Schema is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xs:complexType name="testType"/>
>     <xs:element name="personnel">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element ref="person" minOccurs="1" maxOccurs="unbounded"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:complexType name="fidji">
>         <xs:attribute name="attr"/>
>     </xs:complexType>
>     <xs:element name="person" type="fidji"/>    
> </xs:schema>
> The schema is parsed as an XML Schema 1.1 and then used to validate the XML.
> The stack overflow is like:
> java.lang.StackOverflowError
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:216)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> at org.apache.xerces.impl.xs.XSConstraints.checkTypeDerivationOk(XSConstraints.java:118)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.getAndCheckXsiType(XMLSchemaValidatorXerces.java:2959)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2252)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:963)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)
> I added some logging in XSConstraints, it has some recursive code like:
>  if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
>             return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
> which could be guarded to be something like:
> if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE 
>             && directBase != derived
>             )

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] [Updated] (XERCESJ-1570) Stack overflow when validating XML with XML Schema (using 1.1)

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1570:
------------------------------------------

    Fix Version/s:     (was: 2.11.0)
    
> Stack overflow when validating XML with XML Schema (using 1.1)
> --------------------------------------------------------------
>
>                 Key: XERCESJ-1570
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1570
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The XML is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:noNamespaceSchemaLocation="personal.xsd">
>     <person  xsi:type="testType"></person>
> </personnel>
> The XML Schema is like:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     <xs:complexType name="testType"/>
>     <xs:element name="personnel">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element ref="person" minOccurs="1" maxOccurs="unbounded"/>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>     <xs:complexType name="fidji">
>         <xs:attribute name="attr"/>
>     </xs:complexType>
>     <xs:element name="person" type="fidji"/>    
> </xs:schema>
> The schema is parsed as an XML Schema 1.1 and then used to validate the XML.
> The stack overflow is like:
> java.lang.StackOverflowError
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:216)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> 	at org.apache.xerces.impl.xs.XSConstraints.checkComplexDerivation(XSConstraints.java:241)
> at org.apache.xerces.impl.xs.XSConstraints.checkTypeDerivationOk(XSConstraints.java:118)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.getAndCheckXsiType(XMLSchemaValidatorXerces.java:2959)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.handleStartElement(XMLSchemaValidatorXerces.java:2252)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidatorXerces.startElement(XMLSchemaValidatorXerces.java:815)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:87)
> 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:963)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:268)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1655)
> I added some logging in XSConstraints, it has some recursive code like:
>  if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
>             return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
> which could be guarded to be something like:
> if (directBase.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE 
>             && directBase != derived
>             )

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org