[ http://issues.apache.org/jira/browse/XERCESJ-380?page=all ]
Michael Glavassevich updated XERCESJ-380:
-----------------------------------------
Bugzilla Id: (was: 10764)
Component: XML Schema Structures
(was: DOM (Level 3 Core))
Description:
On Windows XP and NT and 2000, when validating a document with the schema
below, I get a stackOverflow. I've seen the overflow report in 2 different
locations for different schemas:
java.lang.StackOverflowError
at org.apache.xerces.impl.xs.models.XSDFACM.postTreeBuildInit
(XSDFACM.java:899)
....
java.lang.StackOverflowError
at org.apache.xerces.impl.xs.models.XSDFACM.calcFollowList
(XSDFACM.java:732)
....
Here's an example schema to reproduce the problem:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.iss.net/cpe/stackOverflow"
xmlns:stackOverflow="http://www.iss.net/cpe/stackOverflow"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<element name="policy" type="stackOverflow:PolicyType"/>
<complexType name="PolicyType">
<sequence>
<!-- fails for me as low as 5000 and up -->
<element name='sensitivity'
type='stackOverflow:sensitivityType' minOccurs='0' maxOccurs='65535'/>
</sequence>
</complexType>
<complexType name="sensitivityType">
<attribute name="sensitivity" type="int" use="required"/>
</complexType>
</schema>
Here's a code excerpt:
DOMParser domParser = new DOMParser();
domParser.setErrorHandler( errorHandler );
domParser.setFeature( "http://xml.org/sax/features/namespaces", true );
domParser.setFeature( "http://apache.org/xml/features/validation/schema",
true );
domParser.setFeature( "http://xml.org/sax/features/validation", true );
domParser.setProperty( "http://apache.org/xml/properties/schema/external-
schemaLocation", ....);
domParser.parse( new InputSource( new StringReader( .... )) );
was:
On Windows XP and NT and 2000, when validating a document with the schema
below, I get a stackOverflow. I've seen the overflow report in 2 different
locations for different schemas:
java.lang.StackOverflowError
at org.apache.xerces.impl.xs.models.XSDFACM.postTreeBuildInit
(XSDFACM.java:899)
....
java.lang.StackOverflowError
at org.apache.xerces.impl.xs.models.XSDFACM.calcFollowList
(XSDFACM.java:732)
....
Here's an example schema to reproduce the problem:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.iss.net/cpe/stackOverflow"
xmlns:stackOverflow="http://www.iss.net/cpe/stackOverflow"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<element name="policy" type="stackOverflow:PolicyType"/>
<complexType name="PolicyType">
<sequence>
<!-- fails for me as low as 5000 and up -->
<element name='sensitivity'
type='stackOverflow:sensitivityType' minOccurs='0' maxOccurs='65535'/>
</sequence>
</complexType>
<complexType name="sensitivityType">
<attribute name="sensitivity" type="int" use="required"/>
</complexType>
</schema>
Here's a code excerpt:
DOMParser domParser = new DOMParser();
domParser.setErrorHandler( errorHandler );
domParser.setFeature( "http://xml.org/sax/features/namespaces", true );
domParser.setFeature( "http://apache.org/xml/features/validation/schema",
true );
domParser.setFeature( "http://xml.org/sax/features/validation", true );
domParser.setProperty( "http://apache.org/xml/properties/schema/external-
schemaLocation", ....);
domParser.parse( new InputSource( new StringReader( .... )) );
Environment:
Operating System: Windows XP
Platform: PC
was:
Operating System: Windows XP
Platform: PC
Assign To: (was: Xerces-J Developers Mailing List)
Priority: Major
> stackOverflow with maxOccurs over 5000 and less than unbounded
> --------------------------------------------------------------
>
> Key: XERCESJ-380
> URL: http://issues.apache.org/jira/browse/XERCESJ-380
> Project: Xerces2-J
> Type: Bug
> Components: XML Schema Structures
> Versions: 2.0.2
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: afuqua
>
> On Windows XP and NT and 2000, when validating a document with the schema
> below, I get a stackOverflow. I've seen the overflow report in 2 different
> locations for different schemas:
> java.lang.StackOverflowError
> at org.apache.xerces.impl.xs.models.XSDFACM.postTreeBuildInit
> (XSDFACM.java:899)
> ....
> java.lang.StackOverflowError
> at org.apache.xerces.impl.xs.models.XSDFACM.calcFollowList
> (XSDFACM.java:732)
> ....
> Here's an example schema to reproduce the problem:
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.iss.net/cpe/stackOverflow"
> xmlns:stackOverflow="http://www.iss.net/cpe/stackOverflow"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified">
>
> <element name="policy" type="stackOverflow:PolicyType"/>
> <complexType name="PolicyType">
> <sequence>
> <!-- fails for me as low as 5000 and up -->
> <element name='sensitivity'
> type='stackOverflow:sensitivityType' minOccurs='0' maxOccurs='65535'/>
> </sequence>
> </complexType>
>
> <complexType name="sensitivityType">
> <attribute name="sensitivity" type="int" use="required"/>
> </complexType>
> </schema>
> Here's a code excerpt:
> DOMParser domParser = new DOMParser();
> domParser.setErrorHandler( errorHandler );
> domParser.setFeature( "http://xml.org/sax/features/namespaces", true );
> domParser.setFeature( "http://apache.org/xml/features/validation/schema",
> true );
> domParser.setFeature( "http://xml.org/sax/features/validation", true );
> domParser.setProperty( "http://apache.org/xml/properties/schema/external-
> schemaLocation", ....);
> domParser.parse( new InputSource( new StringReader( .... )) );
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
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]