Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resilience4j with sprinboot 2.2.0.Release #731

Closed
ozie03 opened this issue Nov 6, 2019 · 4 comments
Closed

Resilience4j with sprinboot 2.2.0.Release #731

ozie03 opened this issue Nov 6, 2019 · 4 comments

Comments

@ozie03
Copy link

ozie03 commented Nov 6, 2019

Thanks for raising a Resilience4j issue.
Please provide a brief description of your problem along with the versions you are using.
If possible, please also consider putting together a complete JUnit test that reproduces the issue.

Resilience4j version: 1.1.0

Java version: 11

Problem description:
on starting a springboot application version 2.2.0 with resilienc4j spring boot starter, the application fails to startup with the following error :

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
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:521) ~[na:na]
at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
at java.base/java.lang.Class.forName(Class.java:398) ~[na:na]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:277) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:317) ~[spring-core-5.2.0.RELEASE.jar:5.2.0.RELEASE]
... 24 common frames omitted

@Romeh
Copy link
Member

Romeh commented Nov 6, 2019

you need to add spring boot actuator dependency to ur project and it should be fine

@ozie03
Copy link
Author

ozie03 commented Nov 7, 2019

cool thanks

@ozie03 ozie03 closed this as completed Nov 7, 2019
@duberton
Copy link

duberton commented Nov 7, 2019

@Romeh

I do have actuator as a dependency and i'm still having the same issue but i think it comes down to the fact that resilience4j (RateLimiter, Bulkhead and Retry autoconfigurations) expects EndpointAutoConfiguration to be at the following package:

org.springframework.boot.actuate.autoconfigure

But, currently, spring-boot-actuator-autoconfigure-2.2.0.RELEASE.jar has it located at:

org.springframework.boot.actuate.autoconfigure.endpoint

The above error was reproduced with the following version: resilience4j-spring-boot-1.1.0.jar

Should i migrate to the resilience4j-spring-boot2-1.1.0.jar (spring-boot 2)?

@dlsrb6342
Copy link
Member

@duberton
In CircuitBreakerAutoConfiguration,

import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;

In BulkheadAutoConfiguration,

import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;

Package paths are same as you mentioned. If you have any more question, Please make new issue and not use already closed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants