APPLICATION FAILED TO START after upgrading to spring boot version 2.3.8.Release
shalini12kohli opened this issue · 5 comments
After upgrading to spring boot 2.3.8.RELEASE and spring cloud to Hoxton.SR9, I am getting following exception:
org.springframework.messaging.MessagingException: Exception thrown while invoking BusAutoConfiguration#acceptRemote[1 args]; nested exception is java.lang.IllegalStateException: java.lang.ClassCastException@526e6469
Endpoint [org.springframework.cloud.bus.BusAutoConfiguration]
Method [public void org.springframework.cloud.bus.BusAutoConfiguration.acceptRemote(org.springframework.cloud.bus.event.RemoteApplicationEvent)] with argument values:
[0] [type=java.lang.String] [value={"type":"RegisterInstanceRemoteApplicationEvent","timestamp":1611732673850,"originService":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","destinationService":"ps-shipmethodservice:**","id":"28831bca-d676-4871-8499-2d837ed31f27","instanceId":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","onInstanceStart":false}] , failedMessage=GenericMessage [payload=byte[355], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedExchange=ps-shipmethodservice, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=ps-shipmethodservice.anonymous.bf6cfAv2T-Soekf_NtRbcw, amqp_redelivered=false, originalContentType=application/json;charset=UTF-8, amqp_receivedRoutingKey=ps-shipmethodservice, id=e84fe2c8-635e-f08b-6835-44f7f3bd3dbd, amqp_consumerTag=amq.ctag-1egWJoPelY6EmHaHAj_kYg, sourceData=(Body:'{"type":"RegisterInstanceRemoteApplicationEvent","timestamp":1611732673850,"originService":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","destinationService":"ps-shipmethodservice:**","id":"28831bca-d676-4871-8499-2d837ed31f27","instanceId":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","onInstanceStart":false}' MessageProperties [headers={contentType=text/plain, originalContentType=application/json;charset=UTF-8}, contentType=text/plain, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=ps-shipmethodservice, receivedRoutingKey=ps-shipmethodservice, deliveryTag=1, consumerTag=amq.ctag-1egWJoPelY6EmHaHAj_kYg, consumerQueue=ps-shipmethodservice.anonymous.bf6cfAv2T-Soekf_NtRbcw]), contentType=text/plain, timestamp=1611732690649}]
at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:64)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:134)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:62)
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:570)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:520)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:208)
at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1300(AmqpInboundChannelAdapter.java:65)
at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:294)
at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)
at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180)
at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.onMessage(AmqpInboundChannelAdapter.java:290)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1608)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1527)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1515)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1506)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1450)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:976)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:922)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:83)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1297)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1203)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: argument type mismatch
Endpoint [org.springframework.cloud.bus.BusAutoConfiguration]
Method [public void org.springframework.cloud.bus.BusAutoConfiguration.acceptRemote(org.springframework.cloud.bus.event.RemoteApplicationEvent)] with argument values:
[0] [type=java.lang.String] [value={"type":"RegisterInstanceRemoteApplicationEvent","timestamp":1611732673850,"originService":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","destinationService":"ps-shipmethodservice:**","id":"28831bca-d676-4871-8499-2d837ed31f27","instanceId":"ps-shipmethodservice:dit02,rabbitmq,elastic,dit02-elastic,cloud:0","onInstanceStart":false}]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:176)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120)
at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55)
... 29 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:171)
... 31 more
Where did the message originate?
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
I'm getting exception at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:64)
I'm using rabbitmq.
Also, I'm using spring-cloud-services version 2.0.0.RC2 [spring boot version 2.3.8.Release and spring cloud version Hoxton.SR9)
I asked where did the message come from? How did you send it? And for a full, minimal sample project.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.