SpringCloud icon indicating copy to clipboard operation
SpringCloud copied to clipboard

authorization-server启动报错

Open luwm opened this issue 4 years ago • 7 comments

BUG描述

已经将授权服务所需要依赖的服务全部启动,当启动authorization-server服务的时候报错

2020-10-13 13:52:28.597 ERROR [authorization-server,,,] 51946 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bindingsEndpoint' defined in class path resource [org/springframework/cloud/stream/config/BindingsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'bindingsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'inputBindingLifecycle' defined in class path resource [org/springframework/cloud/stream/config/BindingServiceConfiguration.class]: Unsatisfied dependency expressed through method 'inputBindingLifecycle' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.bus.SpringCloudBusClient': Unsatisfied dependency expressed through field 'bindingTargetFactories'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'channelFactory' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'channelFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'compositeMessageChannelConfigurer' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'compositeMessageChannelConfigurer' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageConverterConfigurer' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'messageConverterConfigurer' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'compositeMessageConverterFactory' defined in class path resource [org/springframework/cloud/stream/config/ContentTypeConfiguration.class]: Unsatisfied dependency expressed through method 'compositeMessageConverterFactory' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'busJsonConverter' defined in class path resource [org/springframework/cloud/bus/jackson/BusJacksonAutoConfiguration.class]: Unsatisfied dependency expressed through method 'busJsonConverter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.databind.ObjectMapper]: Factory method 'jacksonObjectMapper' threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/exc/InputCoercionException

截图 image

环境

操作系统、组件版本、数据库等 osx mysql 5.8 rabbitmq 3.8.9

luwm avatar Oct 13 '20 06:10 luwm

请问解决了吗

jackspallow avatar Oct 20 '20 00:10 jackspallow

请问解决了吗

没有解决

luwm avatar Oct 21 '20 03:10 luwm

我启动也报同样错误 其他都起来了

linxuanwei avatar Nov 01 '20 02:11 linxuanwei

解决了吗?

yale-zhang avatar Nov 05 '20 23:11 yale-zhang

在auth/pom.xml里添加 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.9.0</version> </dependency>

bluecitymoon avatar Nov 14 '20 10:11 bluecitymoon

需要在authorization-server的pom.xml增加 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.10.0.pr1</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.10.0.pr1</version> </dependency>

luwm avatar Nov 17 '20 06:11 luwm

把authorization-server下pom.xml中jackson-databind版本改为2.9.4即可。

wxb2dyj avatar Dec 24 '20 03:12 wxb2dyj