springboot版本升级导致webservice调用失败org.apache.cxf.common.jaxb.JAXBUtils.createMininumEscapeHandle

很感谢这位作者的文章https://blog.youkuaiyun.com/q340505050518/article/details/105394315

近期对项目版本进行升级

原项目版本

从 Springcloud alibaba 2.1.0   Spring cloud  Greenwich    SpringBoot 2.1.3版本升级,

一开始升级的版本是:

Springcloud alibaba 2.2.0.RELEASE    Spring cloud  Hoxton.SR1     SpringBoot 2.3.0

但是此时其他测试无问题,以为一切顺利

但是在一次webservice调用外部服务时,发现调用失败,抛出如下异常:

 

org.apache.cxf.common.jaxb.JAXBUtils.createMininumEscapeHandler(Ljava/...

后来经过百度,以及CXF官网FAQ 可能遇到问题解决办法

初步判断为springboot 版本和CXF版本不匹配导致,认为Springboot版本较高

选择降低版本

调整架构版本为

Springcloud alibaba 2.2.1.RELEASE    Spring cloud  Hoxton.SR3     SpringBoot 2.2.5.RELEASE

CXF版本选择为使用最多的3.2.4版本

并对原CXF 3.2.4版本中的core包进行exclusion

如下:

 <!-- webService-->
        <!-- cxf框架依赖  -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
            <version>${cxf-spring-boot-starter-jaxws.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>cxf-core</artifactId>
                    <groupId>org.apache.cxf</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
            <version>3.2.6</version>
        </dependency>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值