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/02/21 00:27:07 UTC
DO NOT REPLY [Bug 17267] New: -
ClassCastException when loading/validating XMLSchema
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=17267>.
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=17267
ClassCastException when loading/validating XMLSchema
Summary: ClassCastException when loading/validating XMLSchema
Product: Xerces2-J
Version: 2.3.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Blocker
Priority: Other
Component: Other
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: malachi@eoti.org
Simple Example using JDOM with XERCES2:
public test(String xml, String xsd)
throws Exception
{
SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",
true);
builder.setFeature("http://apache.org/xml/features/validation/schema", true);
builder.setFeature("http://xml.org/sax/features/validation", true);
builder.setProperty("http://apache.org/xml/properties/schema/external-schemaLoca
tion",xsd);
Document doc = builder.build(xml);
System.out.println("SUCCESS!");
XMLOutputter out = new XMLOutputter(" ", true);
out.output(doc, System.out);
}
Error:
C:\devel\schema>java test
file://C:/devel/schema/temporal-wave/jbase-request1.xml
file://C:/devel/schema/temporal-wave/jbase.xsd
ERROR: Error in building
org.jdom.JDOMException: Error in building
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:373)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:772)
at test.<init>(test.java:35)
at test.main(test.java:18)
Caused by: java.lang.ClassCastException
at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
at org.apache.xerces.parsers.BasicParserConfiguration.reset(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
... 3 more
Caused by: java.lang.ClassCastException
at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
at org.apache.xerces.parsers.BasicParserConfiguration.reset(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:772)
at test.<init>(test.java:35)
at test.main(test.java:18)
Caused by: java.lang.ClassCastException
at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
at org.apache.xerces.parsers.BasicParserConfiguration.reset(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:772)
at test.<init>(test.java:35)
at test.main(test.java:18)
Main Highlight:
Caused by: java.lang.ClassCastException
at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown Source)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org