-
Enhancement
-
Resolution: Won't Fix
-
P3
-
6
-
generic
-
generic
When you run the following code,
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)
.newSchema(new File("No such schema"));
You get the following error:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'file:///c:/kohsuke/Sun/jaxp/jaxp-sources/No such schema', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
This is embarassingly silly.
- case 1,2 and case 3 are easily distinguishable. so please use two different error messages.
- give us the nested exception that shows the underlying cause. That can tell me whether
the resource was not found, or whether there was an IO error.
- in case 3, please give us the name of the element you found.
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)
.newSchema(new File("No such schema"));
You get the following error:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'file:///c:/kohsuke/Sun/jaxp/jaxp-sources/No such schema', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
This is embarassingly silly.
- case 1,2 and case 3 are easily distinguishable. so please use two different error messages.
- give us the nested exception that shows the underlying cause. That can tell me whether
the resource was not found, or whether there was an IO error.
- in case 3, please give us the name of the element you found.