Description of the problem: IDEAL in the program compilation, packaging are whole into, debug on the error, the content is as follows:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration$EurekaHealthCheckHandlerConfiguration': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration$EurekaHealthCheckHandlerConfiguration]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/actuate/health/SimpleStatusAggregator at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1334) ~[spring-beans-5.3.13.jar:5.3.13] ...... at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1326) ~[spring-beans-5.3.13.jar:5.3.13] ... 17 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/actuate/health/SimpleStatusAggregator at org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration$EurekaHealthCheckHandlerConfiguration.<init>(EurekaDiscoveryClientConfiguration.java:64) ~[spring-cloud-netflix-eureka-client-3.1.0.jar:3.1.0] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_251] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_251] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_251] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_251] at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211) ~[spring-beans-5.3.13.jar:5.3.13] ... 19 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.health.SimpleStatusAggregator at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_251] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[na:1.8.0_251] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_251] ... 25 common frames omitted
Error Analysis:
Add eureka
.client
.healthcheck
.enabled=true
in application.properties files
Solution:
1. add dependency in pom.xml
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
2. file->invalidate caches/restart
Read More:
- [Solved] Classnotfoundexception: org.springframework.core.nativedetector error
- serviceimpl inherits generic public impl startup error: ClassCastException (Mybatis-plus version Issue)
- SpringBoot integrates Es error: Error creating bean with name ‘restHighLevelClient‘ defined in class path resource
- [Solved] Rabbitmq injection failed, bean creation failed, error creating bean with name ‘rabbitconnectionfactory’‘
- Eureka Build Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- [Solved] Error creating bean with name ‘entityManagerFactory‘ defined in class path resource
- [Solved] Springboot project introduces Font library error: java.awt.fontformatexception: bad table, tag = XXXXXX
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org
- JPA multiple-data source startup error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘t
- [Solved] spring boot Startup Error: Error creating bean with name ‘requestMappingHandlerMapping‘ defined in class path
- [Siolved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webMvcObject
- [Solved] ES Error: Elasticsearch health check failed
- ES Error: Elasticsearch health check failed [How to Solve]
- [Solved] IDEA springboot Startup Error: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path
- How to Solve Swagger error: IllegalStateException
- [Solved] springboot Error: Error creating bean with name ‘configurationPropertiesBeans‘ defined in class path
- [Solved] Linux java -jar Start Project Error: Unsupported major.minor version 52.0
- [Solved] springCloud Startup Error: Error creating bean with name ‘defaultValidator‘ defined in class path resource
- [Solved] Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderA
- o.s.boot.SpringApplication, Error creating bean with name ‘paymentImpl‘, xml Configuration file error