You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/01/13 10:32:28 UTC
DO NOT REPLY [Bug 16014] New: -
StackOverflowError when using xerces 2.0.2 to validate a xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16014>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16014
StackOverflowError when using xerces 2.0.2 to validate a xml
Summary: StackOverflowError when using xerces 2.0.2 to validate a
xml
Product: Xerces2-J
Version: 2.0.2
Platform: Sun
OS/Version: All
Status: NEW
Severity: Critical
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: anatav@amdocs.com
When using the sax parser in xerces 2.0.2 with a property to set the xsd
content in order to validate the xml I get a java.lang.StackOverflowError
exception as the follow:
Exception in thread "main" java.lang.StackOverflowError
at org.apache.xerces.impl.xs.XMLSchemaLoader.xsdToXMLInputSource
(XMLSchemaLoader.java:614)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:580)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource
(XMLSchemaLoader.java:588)
this is the code I'm using:
static final String JAXP_SCHEMA_LANGUAGE =
"http://java.sun.com/xml/jaxp/properties/schemaLanguage";
static final String W3C_XML_SCHEMA =
"http://www.w3.org/2001/XMLSchema";
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
spf.setValidating(true);
// Create a JAXP SAXParser
SAXParser saxParser = spf.newSAXParser();
// Validation part 2a: set the schema language if necessary
saxParser.setProperty(JAXP_SCHEMA_LANGUAGE,
W3C_XML_SCHEMA);
InputSource is = new InputSource(
new StringReader(aSchemaSource));
saxParser.setProperty(JAXP_SCHEMA_SOURCE, is);
(the aSchemaSource is the xsd)
when running this code in xerces 2.0.0 every thing is ok.
Is this a bug? and if it is? in what version did you fox it since in xerces
2.2.1 its also working.
thanks in advance,
anat avni.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org