cxf运行时报xml验证错误

有时候报xml校验错误,可能因为确包的问题。

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from ServletContext resource [/WEB-
INF/cxf-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard
is strict, but no declaration can be found for element 'simple:server'.

缺个依赖:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>${cxf.version}</version>
</dependency>

加了之后报
java.lang.ClassNotFoundException: org.apache.cxf.aegis.databinding.AegisDatabinding

再加个依赖
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-aegis</artifactId>
<version>${cxf.version}</version>
</dependency>

你可能感兴趣的:(apache,c,xml,Web,servlet)