Comments (11)
Spring Boot 2.4.x requires resilience4j 1.7.0
Did you add spring actuator?
compile('org.springframework.boot:spring-boot-starter-actuator')
from resilience4j-spring-boot2-demo.
Did you try the answer from https://stackoverflow.com/questions/27934418/how-to-exclude-transitive-dependencies-of-spring-boot-dependencies-from-maven-im
from resilience4j-spring-boot2-demo.
I solved the issue by updating my spring-cloud-dpendencies version to 2020.0.2 which has the circuitbreaker-resilience4j version of 1.7.0
Note: 2020.0.2 was released on Mar 18, 2021
from resilience4j-spring-boot2-demo.
do ur health enabled for target resilience4j type for example:
management.health.circuitbreakers.enabled: true
example here : https://github.com/resilience4j/resilience4j-spring-boot2-demo/blob/master/src/main/resources/application.yml#L12
from resilience4j-spring-boot2-demo.
Hi @RobWin
It raises other issues
Error processing condition on io.github.resilience4j.retry.autoconfigure.AbstractRetryConfigurationOnMissingBean.retryRegistry
Failed to introspect Class [io.github.resilience4j.retry.autoconfigure.AbstractRetryConfigurationOnMissingBean] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@9e89d68]
Caused by: java.lang.NoClassDefFoundError: io/github/resilience4j/core/ContextAwareScheduledThreadPoolExecutor
Caused by: java.lang.ClassNotFoundException: io.github.resilience4j.core.ContextAwareScheduledThreadPoolExecutor
from resilience4j-spring-boot2-demo.
check resilienc4j dependencies version in ur project and make sure it is all 1.7 and no transitive dependencies that has conflicting versions
from resilience4j-spring-boot2-demo.
Thanks @Romeh
If you could check my POM file for any conflicts
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.habeebcycle.microservice.composite</groupId>
<artifactId>directive-composite-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>directive-composite-service</name>
<description>Directive Composite Service</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>2020.0.0</spring-cloud.version>
<swagger.version>3.0.0</swagger.version>
<resilience4j.version>1.7.0</resilience4j.version>
<api.version>0.0.1-SNAPSHOT</api.version>
<util.version>0.0.1-SNAPSHOT</util.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Resource server Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-resource-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<!-- Cloud Streaming Dependencies -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-test-support</artifactId>
<scope>test</scope>
</dependency>
<!-- Cloud services -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- Resilient API dependencies -->
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-reactor</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<!-- Application Libraries -->
<dependency>
<groupId>com.habeebcycle.microservice.library</groupId>
<artifactId>api</artifactId>
<version>${api.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.habeebcycle.microservice.library</groupId>
<artifactId>util</artifactId>
<version>${util.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>directive-composite-service</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
from resilience4j-spring-boot2-demo.
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-circuitbreaker-resilience4j/2.0.0 it has 1.6.1 not latest so there is older transitive dependency from spring cloud used version
from resilience4j-spring-boot2-demo.
Still can't get it to work after the exclusion of the transitive dependency from the spring cloud. Even the latest cloud version Hoxton.SR10 used 2.0.0 (the same 1.6.1)
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-circuitbreaker-resilience4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
still getting
java.lang.IllegalStateException: Error processing condition on io.github.resilience4j.retry.autoconfigure.AbstractRetryConfigurationOnMissingBean.retryRegistry
java.lang.NoClassDefFoundError: io/github/resilience4j/core/ContextAwareScheduledThreadPoolExecutor
java.lang.IllegalStateException: Failed to introspect Class [io.github.resilience4j.retry.autoconfigure.AbstractRetryConfigurationOnMissingBean]
from resilience4j-spring-boot2-demo.
Any suggestions on this issue?
Thanks
from resilience4j-spring-boot2-demo.
Does spring boot 2.7.7 support Hystrix.
I have spring-cloud-starter-hysrtrix - 1.1.5.RELEASE.
I am getting the same error with the above dependencies
from resilience4j-spring-boot2-demo.
Related Issues (20)
- Log: Reactor and RxJava2 HOT 5
- fallBackMethod is not activated
- How to change the config resilience4j from applicaton.yml to file application.properites HOT 2
- Getting the issue -java.lang.NoSuchFieldError: entryMap HOT 4
- Broken tests (Java 11) HOT 4
- Error in AbstractIntegrationTest HOT 3
- Description of the options found in YML properties as documentation HOT 3
- building from the command line fails. HOT 2
- Query with instance in Prometheus HOT 1
- No class Def Error - Caused by: java.lang.ClassNotFoundException: io.github.resilience4j.spelresolver.SpelResolver HOT 2
- Retry annotation not working for monoFailure and fluxFailure HOT 7
- Odd gradle issues bringing in old version for spring-boot2 dependency. HOT 1
- Not able to fetch data from some endpoints HOT 1
- Getting error to make an upgrade to at least Gradle 6.8 HOT 1
- spring boot integration test is failing HOT 1
- How to keep different CircuitBreakerConfiguration for multiple circuit breakers? HOT 8
- Provide aspectj definitions HOT 1
- Defining state in application.yml HOT 2
- how to check thread-pool-bulkhead health? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resilience4j-spring-boot2-demo.