Today when using Springcloud to build a micro-service, using feign to do communication components, the results of error
java.lang.IllegalStateException:Failed to Introspect Class [ Org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration] from ClassLoader [[email Protected]] at Org.springframework.util.ReflectionUtils.getDeclaredMethods (reflectionutils.java:659) ~[ SPRING-CORE-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.util.ReflectionUtils.doWithMethods ( reflectionutils.java:556) ~[SPRING-CORE-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.util.ReflectionUtils.doWithMethods (reflectionutils.java:541) ~[spring-core-5.0.0.rc3.jar : 5.0.0.rc3] at Org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods (reflectionutils.java:599) ~[ SPRING-CORE-5.0.0.RC3.JAR:5.0.0.RC3] At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod ( abstractautowirecapablebeanfactory.java:728) ~[SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType (Abstractautowirecapablebeanfactory.java:670) ~[SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType ( abstractautowirecapablebeanfactory.java:638) ~[SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:1507) ~[ SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] At Org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType ( defaultlistablebeanfactory.java:421) ~[SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType ( defaultlistablebeanfactory.java:391) ~[SPRING-BEANS-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors ( postprocessorregistrationdelegate.java:97) ~[SPRING-CONTEXT-5.0.0.RC3.JAR:5.0.0.RC3] at Org.springframework.context.support.Abstractapplicationcontext.invokebeanfactorypostprocessors (abstractapplicationcontext.java:693) ~[ SPRING-CONTEXT-5.0.0.RC3.JAR:5.0.0.RC3] At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:531) ~[ SPRING-CONTEXT-5.0.0.RC3.JAR:5.0.0.RC3] At Org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh ( servletwebserverapplicationcontext.java:122) ~[SPRING-BOOT-2.0.0.M3.JAR:2.0.0.M3] at Org.springframework.boot.SpringApplication.refresh (springapplication.java:750) [spring-boot-2.0.0.m3.jar:2.0.0. M3] at Org.springframework.boot.SpringApplication.refreshContext (springapplication.java:386) [ SPRING-BOOT-2.0.0.M3.JAR:2.0.0.M3] at Org.springframework.boot.SpringApplication.run (springapplication.java:327) [SPRING-BOOT-2.0.0.M3.JAR:2.0.0.M3] at Org.springframework.boot.SpringApplication.run (Springapplication.java : 1245) [spring-boot-2.0.0.m3.jar:2.0.0.m3] at Org.springframework.boot.SpringApplicatiOn.run (springapplication.java:1233) [spring-boot-2.0.0.m3.jar:2.0.0.m3] at Com.wugui.spring.cloud.weather.Application.main (application.java:14) [classes/:na]caused by: Java.lang.noclassdeffounderror:org/springframework/cloud/client/loadbalancer/loadbalancedretryfactory at JAVA.LANG.CLASS.GETDECLAREDMETHODS0 (Native Method) ~[na:1.8.0_31] at Java.lang.Class.privateGetDeclaredMethods ( class.java:2693) ~[na:1.8.0_31] at Java.lang.Class.getDeclaredMethods (class.java:1967) ~[na:1.8.0_31] at ORG.SPRINGF Ramework.util.ReflectionUtils.getDeclaredMethods (reflectionutils.java:641) ~[spring-core-5.0.0.rc3.jar:5.0.0. RC3] ... Common Frames omittedcaused By:java.lang.ClassNotFoundException: Org.springframework.cloud.client.loadbalancer.LoadBalancedRetryFactory at Java.net.urlclassloader$1.run ( urlclassloader.java:372) ~[na:1.8.0_31] at Java.net.urlclassloader$1.run (urlclassloader.java:361) ~[na:1.8.0_31] at Java.security.AccessController.doPrivileged (Native Method) ~[na:1.8.0_31] at Java.net.URLClassLoader.findClass (urlclassloader.java:360) ~[na:1.8.0_31] at Java.lang.ClassLoader.load Class (classloader.java:424) ~[na:1.8.0_31] at Sun.misc.launcher$appclassloader.loadclass (Launcher.java:308) ~[na : 1.8.0_31] at Java.lang.ClassLoader.loadClass (classloader.java:357) ~[na:1.8.0_31] ... Common frames omitted
The approximate reason is that the relevant class Loadbalancedretryfactory solution is not found:
- Available in Springboot version and Springcloud version, original:
springBootVersion = ‘2.0.0.M3‘ springCloudVersion = ‘Finchley.M2‘
springBootVersion = ‘2.0.0.M3‘ springCloudVersion = ‘Finchley.M9‘
Springcloud Micro-Service Feign component error