Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get StackOverflow when I specify maxOccurs= "25000" #87

Open
vladimirovichsa opened this issue Oct 28, 2019 · 3 comments
Open

Get StackOverflow when I specify maxOccurs= "25000" #87

vladimirovichsa opened this issue Oct 28, 2019 · 3 comments

Comments

@vladimirovichsa
Copy link

Hi, faced such problem when I specify at an element maxOccurs= "25000", I receive an error with StackOverflow.

But if I specify maxOccurs= "unbounded", validation passes and I get my xml even in 100,000 elements which is marked maxOccurs="unbounded".

Stack trace:
Exception in thread "main" java.lang.StackOverflowError at java.util.HashMap.putVal(HashMap.java:657) at java.util.HashMap.put(HashMap.java:612) at java.util.HashSet.add(HashSet.java:220) at com.ctc.wstx.shaded.msv_core.reader.xmlschema.AttributeWildcardComputer.onRef(AttributeWildcardComputer.java:131) at com.ctc.wstx.shaded.msv_core.grammar.ReferenceExp.visit(ReferenceExp.java:109) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onBinExp(ExpressionWalker.java:95) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onSequence(ExpressionWalker.java:91) at com.ctc.wstx.shaded.msv_core.grammar.SequenceExp.visit(SequenceExp.java:46) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onBinExp(ExpressionWalker.java:95) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onChoice(ExpressionWalker.java:87) at com.ctc.wstx.shaded.msv_core.grammar.ChoiceExp.visit(ChoiceExp.java:48) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onBinExp(ExpressionWalker.java:96) at com.ctc.wstx.shaded.msv_core.grammar.util.ExpressionWalker.onSequence(ExpressionWalker.java:91)

@cowtowncoder
Copy link
Member

Please include a (unit) test to reproduce the problem. Textual explanation and exception is unfortunately not enough to have an idea of what might be happening.

@cowtowncoder
Copy link
Member

Also: this may well be a limitation of Multi-Schema Validator (component Woodstox uses for validation modes other than DTD), so if there's a test, probably would need to file an issue against that.

@vladimirovichsa
Copy link
Author

Good afternoon. Sorry for taking so long to answer. Sample code with xml and xsd posted
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants