JAXP throw Exception when validate XML with SAX

Exception:Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl @1ff7a1e] does not support XML Schema.

只需要在特定目录添加一个文件:jaxp.properties
内容如下
javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl


如果是Bea/jrockit可以添加到如下类似目录
D:\bea\jrockit_160_05\jre\lib


-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl


 

你可能感兴趣的:(JAXP throw Exception when validate XML with SAX)