posts - 82, comments - 269, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

JAXP throw Exception when validate XML with SAX

Posted on 2011-08-10 18:12 itspy 阅读(442) 评论(0)  编辑  收藏 所属分类: JAVA技术

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


 


只有注册用户登录后才能发表评论。


网站导航: