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.

Aspectj mandatory on version 2.0.0

See original GitHub issue

Resilience4j version: 2.0.0

Java version: 17

Hello,

We are using resilicience4j for the retry strategy on our WebClient calls. We don’t use @Retry annotation or anything aspect related. However, with the upgrade to the 2.0.0 (we were on 1.7.1), we can’t start our application without Aspectj on the classpath as we get this error:

Caused by: java.lang.IllegalStateException: Failed to introspect Class [io.github.resilience4j.fallback.FallbackExecutor] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@1d44bcfa]
...
Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.ProceedingJoinPoint

We shouldn’t need to add Aspectj for this to work. After looking into the resilience4j-spring dependency, I found this bean definition that should only be necessary for Aspectj on the classpath I think. And this is the class that uses Aspectj.

    @Bean
    public FallbackExecutor fallbackExecutor(SpelResolver spelResolver, FallbackDecorators fallbackDecorators) {
        return new FallbackExecutor(spelResolver, fallbackDecorators);
    }

Can you please take a look at this?

Thank you for your help.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RobWincommented, Dec 5, 2022

Released

1reaction
20010941commented, Nov 29, 2022

Hello,

Thanks for the quick fix. I just tried it, it works well 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

7.2 @AspectJ support - Spring
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with Java 5 annotations. The @AspectJ style was introduced by...
Read more >
AspectJ Frequently Asked Questions | The Eclipse Foundation
What Java versions does AspectJ require and support? 2. How do I download and install AspectJ? ... What extra memory is required at...
Read more >
metrics-aspectj/README.md at master · astefanutti ... - GitHub
Metrics AspectJ is compatible with Metrics version 3.0.0 + and requires Java 6 or ... can be used so that the only required...
Read more >
AspectJ maven plugin with annotation processor - sources are ...
AspectJ maven plugin with annotation processor - sources are generated twice ... <artifactId>fontbox</artifactId> <version>2.0.0</version> ...
Read more >
Simplifying Enterprise Applications with Spring 2.0 and AspectJ
Spring 2.0 uses the AspectJ pointcut language by default (restricted to execution join point kinds). If it sees an AspectJ pointcut expression, ...
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