【问题标题】:Spring 4.0.3 xerces 2.9.1 and Thymeleaf on Weblogic 10.3.6Weblogic 10.3.6 上的 Spring 4.0.3 xerces 2.9.1 和 Thymeleaf
【发布时间】: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。

请帮忙!

【问题讨论】:

标签: spring weblogic xerces thymeleaf


【解决方案1】:

首先 - Thymeleaf 目前主要是为 Spring 3 设计的,所以我建议使用 Spring 3,除非你有特殊要求迫使你使用 Spring 4。

那么您应该尝试这是 WebLogic 特定的问题,或者它是否也发生在 Jetty 或 Tomcat 上。

然后查看关于maven和xml-problems的常用信息

【讨论】:

    猜你喜欢
    • 2019-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-16
    • 1970-01-01
    • 1970-01-01
    • 2012-08-29
    相关资源
    最近更新 更多