You need to enable JavaScript to run this app. Cloud SDK从3.36.0升级至3.42.0启动报resilience4j类缺失错误求解决方案
优惠活动
大模型
产品
解决方案
定价
更多

Cloud SDK从3.36.0升级至3.42.0启动报resilience4j类缺失错误求解决方案

问题根因

该错误为resilience4j依赖版本不兼容导致:SAP Cloud SDK 3.42.0默认依赖resilience4j 1.7.0版本,你项目中其他传递依赖引入了更低版本的resilience4j-core包,io.github.resilience4j.core.IntervalBiFunction是resilience4j 1.7.0新增的类,低版本core包中不存在该类,因此启动时抛出类找不到异常。

解决方案
  • 统一锁定所有resilience4j依赖版本为1.7.0,和Cloud SDK 3.42.0依赖版本对齐。如果使用Maven,直接在pom.xml的dependencyManagement节点中导入resilience4j的bom即可:
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.github.resilience4j</groupId>
            <artifactId>resilience4j-bom</artifactId>
            <version>1.7.0</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

如果使用Gradle,在build.gradle的依赖管理中添加对应bom配置即可。

  • 删除项目中单独声明的resilience4j-retry、resilience4j-circuitbreaker等子依赖的版本号,让bom统一管理所有resilience4j相关依赖的版本,避免出现版本不一致问题。
  • 执行依赖冲突检查:Maven项目运行命令mvn dependency:tree | grep resilience4j,Gradle项目运行命令./gradlew dependencies | grep resilience4j,确认所有resilience4j开头的依赖版本均为1.7.0,手动排除其他低版本的传递依赖。
  • 清理项目缓存并重新构建:执行mvn clean install或者对应Gradle清理构建命令,避免旧依赖缓存影响构建结果。

内容的提问来源于stack exchange,提问作者Swastik

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.10.21 22:24:05