resin上org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found的有关问题

resin下org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found的问题

项目在迁移应用服务器的时候,在新服务器上跑不起来。

抛出org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found的错误。

查看了网上的资料,使用了如下几种方法:

1 jre/lib目录下创建jaxp.properties

2 下载xerces.jar加入项目lib目录下

3 本想在程序中指定system变量,但我的spring是通过监听器加载的,不知道在什么时候指定。。。

均不好使,最后查看了resin的配置文档,发现了问题。

http://caucho.com/resin-3.1/doc/jaxp.xtp

system-property for using Resin XML and XSLT

<!– xml –>

<system-property javax.xml.parsers.DocumentBuilderFactory=

                 “com.caucho.xml.parsers.XmlDocumentBuilderFactory”/>

<system-property javax.xml.parsers.SAXParserFactory=

                 “com.caucho.xml.parsers.XmlSAXParserFactory”/>

resin也是可以设置jdk所使用的xml解析器的。而凑巧我们这的系统大哥刚巧将javax.xml.parsers.SAXParserFactory指定为org.apache.xerces.jaxp.DocumentBuilderFactoryImpl。

删除后,问题解决了。

留个脚印,为自己和遇到同样问题的朋友提供个思路。

resin上org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found的有关问题

相关文章:

你感兴趣的文章:

标签云: