开发者

Java xerces DocumentBuilderFactoryimpl not found - What to do?

I get this message :

javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImp

but i can't seem to solve the problem. I have googled, but can't find any good solutions.

Does anyone have an idea of 开发者_运维百科what could be wrong? And maybe how to solve it :)


The org.apache.xerces is from the Apache Xerces package, and something in your application has a dependency on it. Try downloading it (latest version is 2.9.0) and adding it to your application's classpath.


DocumentBuilderFactory has a multi-step process for finding the actual parser implementation, as described in the linked JavaDoc. Your error message is almost certainly coming from there.

I suspect that your JBoss startup script is setting the javax.xml.parsers.DocumentBuilderFactory system property incorrectly (I've seen this happen before, used to avoid a bug in the released library). I would start by grepping the JBoss configuration directory for that property, followed by explicitly setting the jaxp.debug property (also described in the link). Assuming that your startup script is indeed explicitly setting the property, find out who made that change and ask him/her if you can delete it (or to provide you with the correct JARs if not).


As you've tagged your question JBoss, I'll assume your code is running in the JBoss container.

JBoss may have already loaded a version of Xerces for it's own use and you're trying to load a different version in your code (either explicitly or through some dependency) and the configuration for your version is not compatible with the version that's already loaded.

This JIRA Ticket on JBoss.org suggests deleting the xercesimpl.jar in jasperserver/WEB-INF/lib folder to allow your version to be used.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜