I recently move some legacy code from spring boot 2.7.5 to 3.0.0-RC1 and got the following message after starting the application: ed: java.lang.NoClassDefFoundError: io/micrometer/observation/docs/DocumentedObservation] with root cause
java.lang.ClassNotFoundException: io.micrometer.observation.docs.DocumentedObservation
at org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryWrapper.findOne(ObservationEnvironmentRepositoryWrapper.java:72) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.cloud.config.server.environment.EnvironmentEncryptorEnvironmentRepository.findOne(EnvironmentEncryptorEnvironmentRepository.java:64) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
my stack is:
spring-cloud 2022.0.0-M5
spring-boot 3.0.0-RC1
Problem is when the config server if fired up, it runs for a while then the above message pops up. I cannot also add eureka discovery client and other services next. Thanks.
Comment From: ENate
More output log
ed: java.lang.NoClassDefFoundError: io/micrometer/observation/docs/DocumentedObservation] with root cause
java.lang.ClassNotFoundException: io.micrometer.observation.docs.DocumentedObservation
at org.springframework.cloud.config.server.environment.ObservationEnvironmentRepositoryWrapper.findOne(ObservationEnvironmentRepositoryWrapper.java:72) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.cloud.config.server.environment.EnvironmentEncryptorEnvironmentRepository.findOne(EnvironmentEncryptorEnvironmentRepository.java:64) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.cloud.config.server.environment.EnvironmentController.getEnvironment(EnvironmentController.java:131) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabelIncludeOrigin(EnvironmentController.java:113) ~[spring-cloud-config-server-4.0.0-M5.jar:4.0.0-M5]
at jdk.internal.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:281) ~[spring-core-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:485) ~[spring-cloud-context-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.0.0-RC2.jar:6.0.0-RC2]
My stack involves the following:
spring-boot 3.0.0-RC1,
and
spring-cloud 2022.0.0-M5, config-server 4.0.0-M5, eureka netflix discovery-server 4.0.0-M5, api-gateway 4.0.0-M5
Eventhough the config server continues to run with the above messages popping up occasionally, it becomes difficult to run eureka discovery and other services. Thanks
Comment From: ENate
I got the following message when trying to run eureka discovery server:
org/apache/hc/core5/http/protocol/HttpContext
2022-10-30T17:22:19.092Z ERROR 11592 --- [ Thread-13] o.s.c.n.e.server.EurekaServerBootstrap : Cannot bootstrap eureka server :
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration': Error creating bean with name 'tlsProperties': Could not bind properties to 'TlsProperties' : prefix=eureka.client.tls, ignoreInvalidFields=false, ignoreUnknownFields=true
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:412) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:365) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:376) ~[spring-cloud-context-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:179) ~[spring-cloud-context-4.0.0-M5.jar:4.0.0-M5]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:362) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-6.0.0-RC2.jar:6.0.0-RC2]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) ~[spring-aop-6.0.0-RC2.jar:6.0.0-RC2]
at jdk.proxy3/jdk.proxy3.$Proxy97.getApplications(Unknown Source) ~[na:na]
at com.netflix.eureka.registry.PeerAwareInstanceRegistryImpl.syncUp(PeerAwareInstanceRegistryImpl.java:223) ~[eureka-core-2.0.0-rc.3.jar:2.0.0-rc.3]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.initEurekaServerContext(EurekaServerBootstrap.java:111) ~[spring-cloud-netflix-eureka-server-4.0.0-M1.jar:4.0.0-M1]
at org.springframework.cloud.netflix.eureka.server.EurekaServerBootstrap.contextInitialized(EurekaServerBootstrap.java:70) ~[spring-cloud-netflix-eureka-server-4.0.0-M1.jar:4.0.0-M1]
at org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration.lambda$start$0(EurekaServerInitializerConfiguration.java:67) ~[spring-cloud-netflix-eureka-server-4.0.0-M1.jar:4.0.0-M1]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'tlsProperties': Could not bind properties to 'TlsProperties' : prefix=eureka.client.tls, ignoreInvalidFields=false, ignoreUnknownFields=true
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:92) ~[spring-boot-3.0.0-RC1.jar:3.0.0-RC1]
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:78) ~[spring-boot-3.0.0-RC1.jar:3.0.0-RC1]
Comment From: philwebb
I suspect this is a duplicate of #32862.