You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Willy Ching <wi...@itistech.com> on 2001/06/26 13:00:31 UTC
Xschema validation: java.lang.StackOverflowError
Hello All,
I'm using xalan 2.1.0 to validate an xml file against schema, and I
got a "StackOverflowError" on some xml document, some works fine.
Error:
java.lang.StackOverflowError
at
org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.j
ava:854)^M
at
org.apache.xerces.validators.common.Grammar.buildSyntaxTree(Grammar.j
ava:854)
My program:
public static Document xSchemaValidate(InputSource in)
throws SAXException, IOException{
DOMParser parser = new DOMParser();
ErrorHandlerImp eh = new ErrorHandlerImp();
parser.setErrorHandler(eh);
parser.setFeature("http://apache.org/xml/features/validation/schema",
true);
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://xml.org/sax/features/namespaces", true);
parser.parse(in);
return eh.getErrorDoc();
}
Please help. any info will be appreaciated.
thank you very much.