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

liben00 2010-11-09

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

抛出org.apache.xerces.jaxp.DocumentBuilderFactoryImplnotfound的错误。

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

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

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

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

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

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

system-propertyforusingResinXMLandXSLT

<!--xml-->

<system-propertyjavax.xml.parsers.DocumentBuilderFactory=

"com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>

<system-propertyjavax.xml.parsers.SAXParserFactory=

"com.caucho.xml.parsers.XmlSAXParserFactory"/>

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

删除后,问题解决了。

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

相关推荐

Limitless / 0评论 2010-08-19
tdeclipse / 0评论 2013-08-01