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] Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura
- [Solved] Spring cloud zuul Error: com.netflix.zuul.exception.ZuulException
- Spring cloud Netflix hystrix/acutor/hystrix.stream Error ut005023
- Eureka Build Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] IDEA Debug Error: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
- IDEA Import Servlet Package Error [How to Solve]
- [Solved] Spring Cloud Use Ribbon Error: No instances available for XXX
- How to Solve Assert error (IDEA Package Imported)
- IDEA Package Error: No valid Maven installation found.
- spring cloud 2020 gateway Error 503 [How to Solve]
- Eureka Error: registration status: 204 deregister status: 200
- [Solved] Springcloud Add Eureka to Startup Error
- [Solved] Spring Boot Error: org.springframework.jdbc.datasource.embedded.EmbeddedData
- [Solved] Classnotfoundexception: org.springframework.core.nativedetector error
- [Solved] IDEA Add maven Project Error: Error:(3,21)java: Package javax.servletdoes not exist
- [Solved] IDEA springboot Startup Error: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path
- Spring Cloud Hoxton.SR9 gateway and reactor-netty 0.9.0.RELEASE is Incompatible [How to Solve]
- IDEA Maven Fail to Download Dependencies Error: ERROR – #org.jetbrains.idea.maven – Cannot reconnect.