You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring配置http:conduit标签找不到声明,WildFly24启动报错如何解决?

错误原因
  • Spring上下文的XSD Schema地址配置错误,是本次报错的核心诱因:
    1. http://cxf.apache.org/jaxws对应的Schema地址错误写为jaxs.xsd,正确应为jaxws.xsd
    2. http://cxf.apache.org/jaxrs对应的Schema地址错误写为jars.xsd,正确应为jaxrs.xsd
    3. http://cxf.apache.org/transports/http/configuration对应的Schema地址误用了WSDL绑定的HTTP配置路径wsdl/http-conf.xsd,CXF HTTP传输配置的正确Schema路径为configuration/http-conf.xsd
  • WildFly 24默认自带CXF模块,若与你Ant构建中引入的${cxf.version}版本不一致,会优先加载容器自带的CXF类,导致Schema解析失败
  • 若存在多个版本CXF依赖混用的情况,也会触发该类配置解析错误
修复步骤
  1. 修正Spring上下文的xsi:schemaLocation配置,将原有错误的三个Schema映射条目:
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/wsdl/http-conf.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxs.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jars.xsd

替换为正确的配置:

http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
  1. 解决WildFly自带CXF模块冲突,在应用的WEB-INF目录下新增jboss-deployment-structure.xml配置,排除容器自带的CXF相关模块:
<jboss-deployment-structure>
    <deployment>
        <exclusions>
            <module name="org.apache.cxf" />
            <module name="org.apache.cxf.impl" />
            <module name="org.apache.ws.security" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>
  1. 确认Ant配置中所有CXF依赖的版本号完全统一,无多版本混用情况,建议使用3.4.x及以上稳定版本适配WildFly 24运行环境
  2. 清理构建缓存后重新打包部署,重启服务即可,修正后你的http:conduit配置会正常生效,自定义的SSLSocketFactory可被正确传入

内容的提问来源于stack exchange,提问作者moh sajid khan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.05 13:24:03