compile error in resilience4j-cloud2-1.4.0-release (incompatible version of io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry)
See original GitHub issueResilience4j version: resilience4j-cloud2-1.4.0-release
Java version: 1.8
Problem description:
after adding compile "io.github.resilience4j:resilience4j-spring-cloud2:1.4.0-SNAPSHOT"
in gradle project, there is a compile error in CircuitBreakerConfiguration.java.
I just follow the instruction in spring-cloud / Getting Started.
it is the output when spring boot application started.
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.github.resilience4j.circuitbreaker.configure.CircuitBreakerConfiguration.createCircuitBreakerRegistry(CircuitBreakerConfiguration.java:141)
The following method did not exist:
io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry.of(Ljava/util/Map;Lio/github/resilience4j/core/registry/RegistryEventConsumer;Lio/vavr/collection/Map;)Lio/github/resilience4j/circuitbreaker/CircuitBreakerRegistry;
The method’s class, io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry, is available from the following locations:
jar:file:/Users/Tsing/.gradle/caches/modules-2/files-2.1/io.github.resilience4j/resilience4j-circuitbreaker/1.1.0/d80782b928298b4c0c174af3fe659a4c01ba7533/resilience4j-circuitbreaker-1.1.0.jar!/io/github/resilience4j/circuitbreaker/CircuitBreakerRegistry.class
It was loaded from the following location:
file:/Users/Tsing/.gradle/caches/modules-2/files-2.1/io.github.resilience4j/resilience4j-circuitbreaker/1.1.0/d80782b928298b4c0c174af3fe659a4c01ba7533/resilience4j-circuitbreaker-1.1.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry
gradle file:
ext { set(‘springCloudVersion’, “Hoxton.RELEASE”) } dependencyManagement { imports { mavenBom “org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}” } } dependencies { implementation ‘org.springframework.boot:spring-boot-starter’ compile ‘io.micrometer:micrometer-registry-prometheus:latest.release’ implementation ‘io.github.resilience4j:resilience4j-micrometer’ implementation ‘org.springframework.boot:spring-boot-starter-actuator’ implementation ‘org.springframework.boot:spring-boot-starter-web’ implementation ‘org.springframework.boot:spring-boot-starter-aop’ implementation ‘org.springframework.cloud:spring-cloud-starter-netflix-eureka-client’ compile “io.github.resilience4j:resilience4j-spring-cloud2:1.4.0-SNAPSHOT” compile(‘org.springframework.cloud:spring-cloud-starter-zookeeper-config’) { exclude group: ‘org.apache.zookeeper’, module: ‘zookeeper’ } compile(‘org.apache.zookeeper:zookeeper:3.4.12’) { exclude group: ‘org.slf4j’, module: ‘slf4j-log4j12’ } testImplementation(‘org.springframework.boot:spring-boot-starter-test’) { exclude group: ‘org.junit.vintage’, module: ‘junit-vintage-engine’ } }
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
You can override it like this to fix this issue if you can’t figure what dependency is including the older version of resiliency4j.
resilience4j-spring-boot2
would include the other dependencies but we still need to override it here to circumvent the issue.can you please send the correct build.gradle file; what dependencied to exclude, i couldnot figureout.