SpringCloud在构建Zipkin的时候异常

it2022-05-05  118

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-07-18 13:27:28.759 ERROR 9040 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.alibaba.ServerConsumer21Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class zipkin.server.ZipkinServerConfiguration     at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:596) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:302) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) [spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]     at com.alibaba.ServerConsumer21Application.main(ServerConsumer21Application.java:12) [classes/:na] Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class zipkin.server.ZipkinServerConfiguration     at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:169) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.retrieveBeanMethodMetadata(ConfigurationClassParser.java:392) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:317) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:586) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]     ... 17 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory     at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_211]     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_211]     at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_211]     at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:158) ~[spring-core-5.1.8.RELEASE.jar:5.1.8.RELEASE]     ... 21 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory     at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_211]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_211]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_211]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_211]     ... 25 common frames omitted

Process finished with exit code 1

以上的这个异常是有SpringBoot的版本引发的,将SpringBoot的其他的版本换成1.5.21就不会引发这个异常了!


最新回复(0)