We are getting below error when upgrading spring boot from 3.2.11 to 3.3.5
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propagationFactoryBuilder' defined in class path resource [org/springframework/boot/actuate/autoconfigure/tracing/BravePropagationConfigurations$PropagationWithBaggage.class]: Failed to instantiate [brave.baggage.BaggagePropagation$FactoryBuilder]: Factory method 'propagationFactoryBuilder' threw exception with message: 'void io.micrometer.tracing.brave.bridge.BraveBaggageManager.<init>(java.util.List)'
at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
at app//org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355)
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185)
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
at app//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at app//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at app//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
at app//org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)
at app//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)
at app//org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at app//org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at app//org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at app//org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137)
at app//org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at app//org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at app//org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1463)
at app//org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553)
at app//org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137)
at app//org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108)
at app//org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225)
at app//org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152)
... 87 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [brave.baggage.BaggagePropagation$FactoryBuilder]: Factory method 'propagationFactoryBuilder' threw exception with message: 'void io.micrometer.tracing.brave.bridge.BraveBaggageManager.<init>(java.util.List)'
at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178)
at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
... 111 more
Caused by: java.lang.NoSuchMethodError: 'void io.micrometer.tracing.brave.bridge.BraveBaggageManager.<init>(java.util.List)'
at org.springframework.boot.actuate.autoconfigure.tracing.BravePropagationConfigurations$PropagationWithBaggage.propagationFactoryBuilder(BravePropagationConfigurations.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146)
... 112 more
Comment From: wilkinsona
The NoSuchMethodError indicates that you're using a version of Micrometer Tracing that isn't compatible with the version of Spring Boot that you're using. This won't happen if you rely upon Spring Boot's dependency management to determine the versions.
If you'd like some help with correcting your pom.xml or build.gradle, please post a question on Stack Overflow that includes a minimal, reproducible example of the problem.