[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: [jira] [Created] (XMLBEANS-495) StackOverflowError when parsing a large number of characters in an X
From: "Mandy Warren (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date: 2012-12-07 9:49:21
Message-ID: JIRA.12622887.1354873686474.2547.1354873761268 () arcas
[Download RAW message or body]
Mandy Warren created XMLBEANS-495:
-------------------------------------
Summary: StackOverflowError when parsing a large number of characters in \
an XML element Key: XMLBEANS-495
URL: https://issues.apache.org/jira/browse/XMLBEANS-495
Project: XMLBeans
Issue Type: Bug
Components: Validator
Affects Versions: Version 2.6
Environment: All
Reporter: Mandy Warren
When XMLBeans validates a very long XML String (1000 or more chars), it generates a \
StackOverFlowException as shown below. In the schema for this element I have defined \
a pattern and a min/max length but XMLBeans is applying the pattern first before \
checking the length. The solution is the fix applied to the class RegularExpression \
in xerces - see https://issues.apache.org/jira/browse/XERCESJ-589 which went into \
version 2.11.
<xs:simpleType name="info">
<xs:restriction base="xs:string">
<xs:maxLength value="3"/>
<xs:minLength value="2"/>
<xs:pattern value="[A-Z0-9]+"/>
</xs:restriction>
</xs:simpleType>
Exception in thread "main" java.lang.StackOverflowError
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1662)
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1872)
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1872)
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1872)
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1872)
at org.apache.xmlbeans.impl.regex.RegularExpression.matchString(RegularExpression.java:1872)
--
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: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic