【发布时间】:2018-01-12 08:40:57
【问题描述】:
我仅在我的应用程序中使用 Spring 框架 4.3.9、Apache CFX 2.3.0 和 Maven 2.2.1。当我运行应用程序时,它运行良好,但是当我使用 Maven 3.x.x (3.3.1/3.5.2) 运行相同的应用程序时,出现以下错误。
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: 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 'jaxws:client'.
以下是上下文 XML 的摘录
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
当我检查 tomcat webapps/app/lib 文件夹时,所有需要的 jars (cxf-api-2.3.0, cxf-codegen-plugin-2.3.0,cxf-tools-wsdlto-frontend-jaxws-2.3.0 ) 也被复制到那里。
如何解决?
【问题讨论】: