【发布时间】:2014-07-10 16:23:57
【问题描述】:
我在 Spring 应用程序上下文初始化期间遇到了一个有线问题。基于来自 thymeleaf 的警告(请参阅此链接:[http://www.darkedges.com/blog/?cat=28][1])
我已经添加了 weblogic-application.xml 和 weblogic.xml,在我使用 spring 3.x 版本之前,pom 依赖项中的 xerces 和 xlan 没有问题。但是,一旦我将 spring 版本升级到 4.0.3.RELEASE,我的部署就失败了
Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.util.Properties com.freddiemac.car.CarSpringConfiguration.sqlQueries()] threw exception; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
Caused By: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
at java.util.XMLUtils.load(XMLUtils.java:57)
at java.util.Properties.loadFromXML(Properties.java:852)
at org.springframework.util.DefaultPropertiesPersister.loadFromXml(DefaultPropertiesPersister.java:78)
Truncated. see log file for complete stacktrace
如果我切换回 spring 3.x 一切正常。
我正在使用带有 Thymeleaf 2.X 的 Spring MVC 4.0.3 和带有上述 url 中的 xerces 和 xlan 的 Weblogic 10.3.6。
请帮忙!
【问题讨论】:
-
darkedge 链接在我尝试访问它时给了我一个 404
标签: spring weblogic xerces thymeleaf