我无法解决这个问题.浏览了很多论坛.请帮忙:
org.springframework.beans.factory.BeanDefinitionStoreException:从ServletContext资源[/WEB-INF/applicationContext.xml]解析XML文档的意外异常; 嵌套异常是javax.xml.parsers.FactoryConfigurationError:找不到javax.xml.parsers.DocumentBuilderFactory的提供程序.
我已将所有jar文件包含在xerces bin中.以下是我的WEB-INF/lib结构:

LeO*_* Li 13
当我们将spring和jpa/hibernate从3升级到4时,我们也遇到了这个问题.对我们来说,这是因为hibernate-entitymanager 4.3.11依赖于jdom,它依赖于xml-apis,它将与JRE的rt.jar冲突. javax.xml的东西.我们将其排除,以便可以正确解析我们的spring xml配置.要解决这个问题,我们可以从依赖树中排除xml-apis.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
通过设置类加载器加载 xerces jar 文件的顺序(WAR->EAR->Server),我可以完全解决上述问题。以下链接取自 Apache 的 Xerces 站点。它有助于解决Websphere Portal/WAS的上述问题:
http://www.ibm.com/developerworks/websphere/library/techarticles/0310_searle/searle.html