question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring Boot 2.4.3 and Resilience4j 1.7.0

See original GitHub issue

Resilience4j version: io.github.resilience4j:resilience4j-spring-boot2:1.7.0 Spring Boot version: 2.4.3

After Upgrading to Spring Boot 2.4.3, I get this Error Message:

java.lang.IllegalStateException: Failed to introspect Class [io.github.resilience4j.retry.autoconfigure.AbstractRetryConfigurationOnMissingBean] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@2c13da15] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481) ~[spring-core-5.3.4.jar:5.3.4] at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:358) ~[spring-core-5.3.4.jar:5.3.4] at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:371) ~[spring-core-5.3.4.jar:5.3.4] at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:414) ~[spring-core-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:747) ~[spring-beans-5.3.4.jar:5.3.4] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1737) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:746) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:685) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:656) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1670) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:570) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:542) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:667) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:659) ~[spring-beans-5.3.4.jar:5.3.4] at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1299) ~[spring-context-5.3.4.jar:5.3.4] at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:899) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:887) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:874) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:815) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:336) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) ~[spring-boot-2.4.3.jar:2.4.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) ~[spring-boot-2.4.3.jar:2.4.3] at com.example.client.ClientApplicationKt.main(ClientApplication.kt:18) ~[main/:na] Caused by: java.lang.NoClassDefFoundError: io/github/resilience4j/core/ContextAwareScheduledThreadPoolExecutor at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na] at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) ~[na:na] at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309) ~[na:na] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) ~[spring-core-5.3.4.jar:5.3.4] ... 22 common frames omitted Caused by: java.lang.ClassNotFoundException: io.github.resilience4j.core.ContextAwareScheduledThreadPoolExecutor at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na] ... 26 common frames omitted

Thats how my dependencies look like: Bildschirmfoto 2021-03-03 um 11 19 20

Changing to io.github.resilience4j:resilience4j-spring-boot2:1.6.1 works fine.

Adding resilience4j-core causes an other error…

Is it possible to use resilience4j-spring-boot2:1.7.0 with spring boot 2.4.3?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chas678commented, Mar 10, 2021

actually - Thinking about it in my example, it could be spring-cloud that is version pinning 1.6.1 of resilience4j-spring - so pinning to 1.7.0 of all the dependencies is probably the correct thing to do. Its a shame there isn’t a BOM to do them all though.

0reactions
Romehcommented, Mar 15, 2021

@chas678 You can create a ticket to spring cloud starter about it meanwhile for reilience4j we have our BOM for it here for maven for example: https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-bom/1.7.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retry with Spring Boot and Resilience4j - Reflectoring
A deep dive into the Spring Boot Resilience4j Retry module, this article shows why, when and how to use it to build resilient...
Read more >
Getting Started - resilience4j
Setup and usage in Spring Boot 3 is demonstrated in a demo. Configuration. You can configure your CircuitBreaker, Retry, RateLimiter, Bulkhead, Thread pool ......
Read more >
Getting compatible version issue when running spring boot ...
If you are using spring-cloud-dependencies then do not use resilience4j dependencies directly but instead you can use:
Read more >
Enforcing Resilience in a Spring Boot App using Resilience4J
An important property of modern web apps is Resilience. In simple words, resilience is the ability of a system's feature to fail gracefully ......
Read more >
Spring Boot Microservices Circuit breaker Resilience4j ...
Simple resilience4j spring boot Implementations. We need to add following dependencies (Spring Boot 2.4.x requires resilience4j 1.7.0).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found