找不到 javax.xml.parsers.DocumentBuilderFactory 的提供程序 [英] Provider for javax.xml.parsers.DocumentBuilderFactory cannot be found
问题描述
我无法解决这个问题.浏览了许多论坛.请帮忙:
I am not able to get past this problem. Browsed through many forums. Pls help:
org.springframework.beans.factory.BeanDefinitionStoreException:从 ServletContext 资源解析 XML 文档时出现意外异常[/WEB-INF/applicationContext.xml];嵌套异常是javax.xml.parsers.FactoryConfigurationError: Provider for找不到 javax.xml.parsers.DocumentBuilderFactory.
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be found.
我已将所有 jar 文件包含在 xerces bin 中.以下是我的 WEB-INF/lib 结构:
I have included all the jar files in xerces bin. Following is my WEB-INF/lib structure:
推荐答案
通过设置类加载器加载 xerces jar 文件的顺序 (WAR->EAR->Server),我可以完全解决上述问题.以下链接取自 Apache 的 Xerces 站点.它有助于解决 Websphere Portal/WAS 的上述问题:
I could resolve the above problem entirely, by setting the order in which classloader should load the xerces jar files (WAR->EAR->Server). The following link is taken from Xerces site at Apache. It helps to resolve the above issue for Websphere Portal/WAS:
http://www.ibm.com/developerworks/websphere/library/techarticles/0310_searle/searle.html
这篇关于找不到 javax.xml.parsers.DocumentBuilderFactory 的提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!