Hi, there, I am validating some XML document against their schemas.
Xerces works fine for most cases. But it into trouble when validate XML
against some "big-sized" schema--the schema size is 200k or so. A runtime
error, java.lang.StackOverflowError, arises when Xerces works with such a
schema. The follows are a snippet of the error message:

Exception in thread "main" java.lang.StackOverflowError
        at org.apache.xerces.validators.common.Grammar.getContentSpec(Grammar.ja
va:233)
        at org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.j
ava:820)
        at org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.j
ava:856)
        at org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.j
ava:856).............

I first increased the JVM memory allocation pool, and it did not help. I then inreased
thread JVM thread stack size, then the system hangs. I looked into the Xerces source,
as expected, the Xcerces use recursion algorithm to do the validation. So, here, it seems
the Xerces runs into a endless recursion sometime. I don't know if this is caused by the "big size"
of the schema, or a bug in the Xerces implementation. I am also not sure if this is
a confirmed bug, or limitation, or something else.


Any ideas?

Thanks a lot!

-------
Xuemin Guan
Software Engineer
Appresso SpA (www.appresso.com)
Tel: +81-3-4412-7790(Direct)
+81-3-4412-7700(Represent)
Email: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to