org.xml.sax.SAXParseException文档根元素“ehcache”,必须与DOCTYPE根“null”匹配

时间:2017-06-14 08:14:52

标签: wildfly ehcache saxparseexception

我正在尝试将基于spring + cxf + maven的Web服务部署到wildfly。部署时,面对此异常

2017-06-13 03:20:18,874 INFO  [org.springframework.context.support.PropertySourcesPlaceholderConfigurer] (ServerService Thread Pool -- 60) Loading properties file from VFS resource ["/C:/xxxx/wildfly-9.0.2.Final/bin/content/ServiceWrapper-0.0.1-SNAPSHOT.ear/lib/ehcache-2.10.4.jar/ehcache-failsafe.xml"]
2017-06-13 03:20:18,883 WARN  [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 60) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; Document root element "ehcache", must match DOCTYPE root "null".
2017-06-13 03:20:18,886 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 60) Context initialization failed: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 118; Document root element "ehcache", must match DOCTYPE root "null".

有人可以帮忙。

1 个答案:

答案 0 :(得分:0)

我会在这里猜一下,但你似乎加载了ehcache配置文件,好像它是一个Spring配置文件。这显然是行不通的。

如果您向我们展示实际代码,我可以确认。