zhoutaoo / SpringCloud

基于SpringCloud2.1的微服务开发脚手架,整合了spring-security-oauth2、nacos、feign、sentinel、springcloud-gateway等。服务治理方面引入elasticsearch、skywalking、springboot-admin、zipkin等,让项目开发快速进入业务开发,而不需过多时间花费在架构搭建上。持续更新中
Apache License 2.0
8.71k stars 3.87k forks source link

authorization-server启动报错 #175

Open luwm opened 4 years ago

luwm commented 4 years ago

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

jackspallow commented 4 years ago

请问解决了吗

luwm commented 4 years ago

请问解决了吗

没有解决

linxuanwei commented 4 years ago

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

yale-zhang commented 4 years ago

解决了吗?

bluecitymoon commented 4 years ago

在auth/pom.xml里添加 `

com.fasterxml.jackson.core
        <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>`
luwm commented 3 years ago

需要在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>

wxb2dyj commented 3 years ago

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