请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

rabbitMQ错误

Caused by: org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Could not resolve type id ‘AckRemoteApplicationEvent’ as a subtype of [simple type, class org.springframework.cloud.bus.event.RemoteApplicationEvent]: known type ids = []
at [Source: (String)"{“type”:“AckRemoteApplicationEvent”,“timestamp”:1558664833161,“originService”:“config:0:762678107507a3db5e7faa0c4430b96c”,“destinationService”:"",“id”:“89c78769-ff1e-4d16-bc5b-db1e0d138cc2”,“ackId”:“86f07bbf-f431-4dab-bdc1-4f890bf205ec”,“ackDestinationService”:"",“event”:“org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent”}"; line: 1, column: 9]; nested exception is com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id ‘AckRemoteApplicationEvent’ as a subtype of [simple type, class org.springframework.cloud.bus.event.RemoteApplicationEvent]: known type ids = []
at [Source: (String)"{“type”:“AckRemoteApplicationEvent”,“timestamp”:1558664833161,“originService”:“config:0:762678107507a3db5e7faa0c4430b96c”,“destinationService”:"",“id”:“89c78769-ff1e-4d16-bc5b-db1e0d138cc2”,“ackId”:“86f07bbf-f431-4dab-bdc1-4f890bf205ec”,“ackDestinationService”:"",“event”:“org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent”}"; line: 1, column: 9]
at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:232) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:179) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:68) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:68) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.handler.annotation.support.PayloadArgumentResolver.resolveArgument(PayloadArgumentResolver.java:136) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:113) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:137) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:109) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:48) ~[spring-cloud-stream-2.0.0.M1.jar:2.0.0.M1]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:132) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.cloud.stream.binding.DispatchingStreamListenerMessageHandler$ConditionalStreamListenerHandler.handleMessage(DispatchingStreamListenerMessageHandler.java:122) ~[spring-cloud-stream-2.0.0.M1.jar:2.0.0.M1]
at org.springframework.cloud.stream.binding.DispatchingStreamListenerMessageHandler.handleRequestMessage(DispatchingStreamListenerMessageHandler.java:75) ~[spring-cloud-stream-2.0.0.M1.jar:2.0.0.M1]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:132) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:132) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:105) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:73) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:183) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:162) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:393) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:304) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:195) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:115) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:132) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.channel.FixedSubscriberChannel.send(FixedSubscriberChannel.java:70) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.channel.FixedSubscriberChannel.send(FixedSubscriberChannel.java:64) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:183) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:162) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:108) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:188) ~[spring-integration-core-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access1000(AmqpInboundChannelAdapter.java:56) [spring−integration−amqp−5.0.0.M6.jar:5.0.0.M6]atorg.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter1000(AmqpInboundChannelAdapter.java:56) ~[spring-integration-amqp-5.0.0.M6.jar:5.0.0.M6] at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter1000(AmqpInboundChannelAdapter.java:56) [springintegrationamqp5.0.0.M6.jar:5.0.0.M6]atorg.springframework.integration.amqp.inbound.AmqpInboundChannelAdapterListener.processMessage(AmqpInboundChannelAdapter.java:242) ~[spring-integration-amqp-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:203) ~[spring-integration-amqp-5.0.0.M6.jar:5.0.0.M6]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1382) ~[spring-rabbit-2.0.0.M5.jar:na]
… 21 common frames omitted
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id ‘AckRemoteApplicationEvent’ as a subtype of [simple type, class org.springframework.cloud.bus.event.RemoteApplicationEvent]: known type ids = []
at [Source: (String)"{“type”:“AckRemoteApplicationEvent”,“timestamp”:1558664833161,“originService”:“config:0:762678107507a3db5e7faa0c4430b96c”,“destinationService”:"",“id”:“89c78769-ff1e-4d16-bc5b-db1e0d138cc2”,“ackId”:“86f07bbf-f431-4dab-bdc1-4f890bf205ec”,“ackDestinationService”:"",“event”:“org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent”}"; line: 1, column: 9]
at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1566) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1164) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:291) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4011) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3030) ~[jackson-databind-2.9.0.pr4.jar:2.9.0.pr4]
at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:227) ~[spring-messaging-5.0.0.RC3.jar:5.0.0.RC3]
… 61 common frames omitted

没有人遇到这个错误吗!rabbitMQ连接上了,但发出actuator/bus-refresh时order报错。rabbitmq和docker都跟老师的版本一样了

正在回答 回答被采纳积分+3

2回答

廖师兄 2019-05-25 02:45:41

关于配置不能实现自动刷新的说明

课程中自动刷新演示,我用的是SNAPSHOT版,这个版本的代码是可以变化的,你们拉取的代码和我演示时用的代码不一样了。

另外,spring的release版,自动刷新依旧有bug,课程最后升级部分从源码方面解释了这个bug。

大家看到这节内容,最后演示不成功,没有关系,继续往下看,springcloud组件相对独立,不影响对其它组件的学习。


0 回复 有任何疑惑可以回复我~
  • 师兄,我也遇到此问题了,snapshot版本feign相关注解找不到,然后order我倒退用了之前的M3和M2版本,然后发起bus-refresh请求后就报这个错误,心态崩了
    回复 有任何疑惑可以回复我~ 2019-11-20 17:33:32
  • 心态不用崩自动刷新那一块,有问题先放一边不影响后面的学习,最后升级到正式版再来看自动刷新问题。
    回复 有任何疑惑可以回复我~ 2019-11-21 20:51:41
提问者 wahaha1 2019-05-24 11:07:46

order用的<spring-cloud.version>Finchley.M2</spring-cloud.version>是这个   会不会是这个cloud的问题呢!不用Finchley.BUILD-SNAPSHOT的原因是,用了这个版本Feign报错

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信