0

When I add implementation(group = "org.springframework.cloud", name = "spring-cloud-starter-sleuth") then after starting Spring Application I got exception:

2023-05-25 09:07:12.914 ERROR [,,] 22516 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut must not be null
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:270) ~[spring-context-5.3.24.jar:5.3.24]
    at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:762) ~[spring-context-5.3.24.jar:5.3.24]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:567) ~[spring-context-5.3.24.jar:5.3.24]
    at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.7.6.jar:2.7.6]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.6.jar:2.7.6]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.6.jar:2.7.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.6.jar:2.7.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.6.jar:2.7.6]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.6.jar:2.7.6]
    at ru.tinkoff.risktech.http.client.example.spring.ApplicationKt.main(Application.kt:13) ~[main/:na]
Caused by: java.lang.IllegalArgumentException: Pointcut must not be null
    at org.springframework.util.Assert.notNull(Assert.java:201) ~[spring-core-5.3.24.jar:5.3.24]
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:225) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:289) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:321) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:128) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:97) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:78) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:341) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:293) ~[spring-aop-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:455) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1808) ~[spring-beans-5.3.24.jar:5.3.24]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.24.jar:5.3.24]
    ... 15 common frames omitted

I think, there is some conflict maybe, but I can't understand where.

Full dependencies block:

dependencies {
    implementation(project(":client"))

    implementation(platform("org.springframework.boot:spring-boot-dependencies:2.6.4"))
    implementation(platform("org.springframework.cloud:spring-cloud-dependencies:2021.0.1"))

    implementation("org.springframework.boot:spring-boot-starter-webflux")

    implementation(group = "org.springframework.cloud", name = "spring-cloud-starter-sleuth")

    implementation("org.springframework.cloud:spring-cloud-context")
}

And in my client project I have dependencies like these:

implementation(platform("org.springframework.boot:spring-boot-dependencies:2.6.4"))
    implementation(platform("org.springframework.cloud:spring-cloud-dependencies:2021.0.1"))

    implementation(group = "org.springframework.boot", name = "spring-boot-starter-webflux")
    testImplementation(group = "org.springframework.boot", name = "spring-boot-starter-actuator")

    implementation(group = "org.springframework.cloud", name = "spring-cloud-sleuth-instrumentation")

    implementation(group = "org.springframework.security", name = "spring-security-oauth2-client")
    implementation(group = "org.springframework.security", name = "spring-security-oauth2-jose")

    implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version = "2.9.8")

    implementation(group = "io.github.microutils", name = "kotlin-logging", version = "2.1.23")

    implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.6.4")
    implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-reactive", version = "1.6.4")

    implementation(group = "io.github.resilience4j", name = "resilience4j-circuitbreaker", version = "1.7.0")
    implementation(group = "io.github.resilience4j", name = "resilience4j-kotlin", version = "1.7.0")
}

Can you help me, please?

1 Answers1

0

However, the solution was as follows:

you just need to add dependency like this:

implementation(group = "javax.annotation", name = "javax.annotation-api", version = "1.3.2")