问:
JSON deserealization problems while moving from springboot 2.0.2 to 2.2.2
I am moving my project from spring boot 2.0.2 to 2.2.2 , and also from java 8 to java 11. During this an error of deserialization of jsons appeared while refreshing spring bus.
The project starts correctly , but when I execute refresh from the server following errors appear in its log (the same server consumes the refresh message in order to simplify debugging of this problem,actually several services consume refresh message)

```<code>
2019-12-18 22:54:02.311 [springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ-1] ERROR o.s.i.handler.LoggingHandler.[handleMessageInternal:187] []- org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9]; nested exception is com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9], failedMessage=GenericMessage [payload=byte[206], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedExchange=springCloudBus, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ, amqp_redelivered=false, amqp_receivedRoutingKey=springCloudBus, amqp_timestamp=Wed Dec 18 22:53:59 IST 2019, amqp_messageId=64f6351b-cb29-2e06-2f02-2426e8ba6fea, id=3c2ff3ce-c8f0-aca6-6709-a216ee8552ab, amqp_consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, sourceData=(Body:'{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}' MessageProperties [headers={}, timestamp=Wed Dec 18 22:53:59 IST 2019, messageId=64f6351b-cb29-2e06-2f02-2426e8ba6fea, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=springCloudBus, receivedRoutingKey=springCloudBus, deliveryTag=1, consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ]), contentType=application/json, timestamp=1576702439300}]
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:235)
    at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:197)
    at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:70)
    at org.springframework.cloud.stream.config.SmartPayloadArgumentResolver.resolveArgument(SmartPayloadArgumentResolver.java:115)
    at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:117)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:148)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:116)
    at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:127)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:170)
    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:73)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:453)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:403)
    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:198)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1300(AmqpInboundChannelAdapter.java:61)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:239)
    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:236)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1569)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1488)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1476)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1467)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1411)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:958)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:908)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:81)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1279)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1185)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9]
    at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
    at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1758)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1265)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:290)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
    at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3300)
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:219)
    ... 36 more

2019-12-18 22:54:02.316 [AMQP Connection 127.0.0.1:5672] ERROR o.s.a.r.c.CachingConnectionFactory.[log:1567] []- Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'DLX' in vhost '/', class-id=60, method-id=40)

</code>```

```<code>2019-12-18 22:54:06.837 [springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ-1] ERROR o.s.i.handler.LoggingHandler.[handleMessageInternal:187] []- org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Could not resolve type id 'AckRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","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 `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}"; line: 1, column: 9], failedMessage=GenericMessage [payload=byte[358], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedExchange=springCloudBus, amqp_deliveryTag=2, deliveryAttempt=3, amqp_consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ, amqp_redelivered=false, amqp_receivedRoutingKey=springCloudBus, amqp_timestamp=Wed Dec 18 22:54:03 IST 2019, amqp_messageId=f9e5dc7e-2365-797f-e078-d62c78a42e43, id=b3c94b70-64dc-f461-036c-7f496b0928e7, amqp_consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, sourceData=(Body:'{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}' MessageProperties [headers={}, timestamp=Wed Dec 18 22:54:03 IST 2019, messageId=f9e5dc7e-2365-797f-e078-d62c78a42e43, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=springCloudBus, receivedRoutingKey=springCloudBus, deliveryTag=2, consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ]), contentType=application/json, timestamp=1576702443835}]
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:235)
    at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:197)
    at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:70)
    at org.springframework.cloud.stream.config.SmartPayloadArgumentResolver.resolveArgument(SmartPayloadArgumentResolver.java:115)
    at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:117)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:148)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:116)
    at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:127)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:170)
    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:73)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:453)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:403)
    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:198)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1300(AmqpInboundChannelAdapter.java:61)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:239)
    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:236)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1569)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1488)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1476)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1467)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1411)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:958)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:908)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:81)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1279)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1185)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'AckRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}"; line: 1, column: 9]
    at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
    at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1758)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1265)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:290)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
    at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3300)
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:219)
    ... 36 more
2019-12-18 22:54:06.840 [AMQP Connection 127.0.0.1:5672] ERROR o.s.a.r.c.CachingConnectionFactory.[log:1567] []- Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'DLX' in vhost '/', class-id=60, method-id=40)

</code>```

When I start project on openjdk 11 with springboot 2.0.2 everything works fine.
While debugging this problem I saw that upon consuming the refresh message jackson is unable to create deserializers for subtypes of RemoteApplicationEvent. But during serialization of the same message is successful and 4 serializers are created.
I thought that it is some kind of versions clash of dependencies but still unable to find it.
Below are versions of main dependencies in the project :

```<code>        <spring-boot-version>2.2.2.RELEASE</spring-boot-version>
        <spring-version>5.2.2.RELEASE</spring-version>
        <swagger-version>2.9.2</swagger-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <common.kafka.version>1.0.8</common.kafka.version>
        <spring.cloud.version>Hoxton.RELEASE</spring.cloud.version>
        <spring.cloud.config.version>2.2.0.RELEASE</spring.cloud.config.version>
        <spring-boot-admin.version>2.2.0</spring-boot-admin.version>
        <com.fasterxml.jackson.version>2.10.1</com.fasterxml.jackson.version>
        <cassandra.unit.test>3.5.0.1</cassandra.unit.test>
        <redisson.version>3.11.6</redisson.version>
        <swagger-annotations.version>1.5.24</swagger-annotations.version>
        <lombok.version>1.18.10</lombok.version>
        <spotbugs.version>3.1.12</spotbugs.version>
</code>```

below attaching dependencies of the relevant module :

```<code> <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring-boot-version}</version>
            <scope>test</scope>
        </dependency>
        <!--/spring-boot-->
        <!--spring-cloud-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
        </dependency>
        <!--/spring-cloud-->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>5.0.8.RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.github.rockaport</groupId>
            <artifactId>alice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20190722</version>
        </dependency>
    </dependencies>

</code>```

Thank you

答:
I had same error. I added annotation BusJacksonAutoConfiguration. That resolved my problem.

So try to add this in your configuration:

```<code>@Import({BusJacksonAutoConfiguration.class, BusAutoConfiguration.class})
</code>```

Body:
I am moving my project from spring boot 2.0.2 to 2.2.2 , and also from java 8 to java 11. During this an error of deserialization of jsons appeared while refreshing spring bus.
The project starts correctly , but when I execute refresh from the server following errors appear in its log (the same server consumes the refresh message in order to simplify debugging of this problem,actually several services consume refresh message)

2019-12-18 22:54:02.311 [springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ-1] ERROR o.s.i.handler.LoggingHandler.[handleMessageInternal:187] []- org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9]; nested exception is com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9], failedMessage=GenericMessage [payload=byte[206], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedExchange=springCloudBus, amqp_deliveryTag=1, deliveryAttempt=3, amqp_consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ, amqp_redelivered=false, amqp_receivedRoutingKey=springCloudBus, amqp_timestamp=Wed Dec 18 22:53:59 IST 2019, amqp_messageId=64f6351b-cb29-2e06-2f02-2426e8ba6fea, id=3c2ff3ce-c8f0-aca6-6709-a216ee8552ab, amqp_consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, sourceData=(Body:'{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}' MessageProperties [headers={}, timestamp=Wed Dec 18 22:53:59 IST 2019, messageId=64f6351b-cb29-2e06-2f02-2426e8ba6fea, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=springCloudBus, receivedRoutingKey=springCloudBus, deliveryTag=1, consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ]), contentType=application/json, timestamp=1576702439300}]
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:235)
    at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:197)
    at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:70)
    at org.springframework.cloud.stream.config.SmartPayloadArgumentResolver.resolveArgument(SmartPayloadArgumentResolver.java:115)
    at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:117)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:148)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:116)
    at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:127)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:170)
    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:73)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:453)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:403)
    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:198)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1300(AmqpInboundChannelAdapter.java:61)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:239)
    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:236)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1569)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1488)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1476)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1467)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1411)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:958)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:908)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:81)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1279)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1185)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'RefreshRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"RefreshRemoteApplicationEvent","timestamp":1576702439248,"originService":"config-server:8888:6e0d310ef7bf7a5a08e730d42577a1c5","destinationService":"**","id":"514210a8-3b49-408b-99be-c61ea17ecf98"}"; line: 1, column: 9]
    at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
    at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1758)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1265)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:290)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
    at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3300)
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:219)
    ... 36 more

2019-12-18 22:54:02.316 [AMQP Connection 127.0.0.1:5672] ERROR o.s.a.r.c.CachingConnectionFactory.[log:1567] []- Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'DLX' in vhost '/', class-id=60, method-id=40)

2019-12-18 22:54:06.837 [springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ-1] ERROR o.s.i.handler.LoggingHandler.[handleMessageInternal:187] []- org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Could not resolve type id 'AckRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","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 `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}"; line: 1, column: 9], failedMessage=GenericMessage [payload=byte[358], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedExchange=springCloudBus, amqp_deliveryTag=2, deliveryAttempt=3, amqp_consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ, amqp_redelivered=false, amqp_receivedRoutingKey=springCloudBus, amqp_timestamp=Wed Dec 18 22:54:03 IST 2019, amqp_messageId=f9e5dc7e-2365-797f-e078-d62c78a42e43, id=b3c94b70-64dc-f461-036c-7f496b0928e7, amqp_consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, sourceData=(Body:'{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}' MessageProperties [headers={}, timestamp=Wed Dec 18 22:54:03 IST 2019, messageId=f9e5dc7e-2365-797f-e078-d62c78a42e43, contentType=application/json, contentLength=0, receivedDeliveryMode=PERSISTENT, priority=0, redelivered=false, receivedExchange=springCloudBus, receivedRoutingKey=springCloudBus, deliveryTag=2, consumerTag=amq.ctag-EdTdjMFj3XcJuKkSEalCgA, consumerQueue=springCloudBus.anonymous.n-VZyfkBSDGKA1l4NdRXWQ]), contentType=application/json, timestamp=1576702443835}]
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:235)
    at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:197)
    at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:70)
    at org.springframework.cloud.stream.config.SmartPayloadArgumentResolver.resolveArgument(SmartPayloadArgumentResolver.java:115)
    at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:117)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:148)
    at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:116)
    at org.springframework.cloud.stream.binding.StreamListenerMessageHandler.handleRequestMessage(StreamListenerMessageHandler.java:55)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:127)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:170)
    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:73)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:453)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:403)
    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:198)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter.access$1300(AmqpInboundChannelAdapter.java:61)
    at org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter$Listener.lambda$onMessage$0(AmqpInboundChannelAdapter.java:239)
    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:236)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1569)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1488)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1476)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1467)
    at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1411)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:958)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:908)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:81)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1279)
    at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1185)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'AckRemoteApplicationEvent' as a subtype of `org.springframework.cloud.bus.event.RemoteApplicationEvent`: known type ids = []
 at [Source: (byte[])"{"type":"AckRemoteApplicationEvent","timestamp":1576702443815,"originService":"spring-boot-admin:8087:416d6b96321b5c4b16be8b2231b80ce9","destinationService":"**","id":"e2b260c2-d94b-4b95-9905-a9ba40db7fdb","ackId":"514210a8-3b49-408b-99be-c61ea17ecf98","ackDestinationService":"**","event":"org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"}"; line: 1, column: 9]
    at com.fasterxml.jackson.databind.exc.InvalidTypeIdException.from(InvalidTypeIdException.java:43)
    at com.fasterxml.jackson.databind.DeserializationContext.invalidTypeIdException(DeserializationContext.java:1758)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownTypeId(DeserializationContext.java:1265)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._handleUnknownTypeId(TypeDeserializerBase.java:290)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:162)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)
    at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97)
    at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254)
    at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3300)
    at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:219)
    ... 36 more
2019-12-18 22:54:06.840 [AMQP Connection 127.0.0.1:5672] ERROR o.s.a.r.c.CachingConnectionFactory.[log:1567] []- Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'DLX' in vhost '/', class-id=60, method-id=40)

When I start project on openjdk 11 with springboot 2.0.2 everything works fine.
While debugging this problem I saw that upon consuming the refresh message jackson is unable to create deserializers for subtypes of RemoteApplicationEvent. But during serialization of the same message is successful and 4 serializers are created.
I thought that it is some kind of versions clash of dependencies but still unable to find it.
Below are versions of main dependencies in the project :

        <spring-boot-version>2.2.2.RELEASE</spring-boot-version>
        <spring-version>5.2.2.RELEASE</spring-version>
        <swagger-version>2.9.2</swagger-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <common.kafka.version>1.0.8</common.kafka.version>
        <spring.cloud.version>Hoxton.RELEASE</spring.cloud.version>
        <spring.cloud.config.version>2.2.0.RELEASE</spring.cloud.config.version>
        <spring-boot-admin.version>2.2.0</spring-boot-admin.version>
        <com.fasterxml.jackson.version>2.10.1</com.fasterxml.jackson.version>
        <cassandra.unit.test>3.5.0.1</cassandra.unit.test>
        <redisson.version>3.11.6</redisson.version>
        <swagger-annotations.version>1.5.24</swagger-annotations.version>
        <lombok.version>1.18.10</lombok.version>
        <spotbugs.version>3.1.12</spotbugs.version>

below attaching dependencies of the relevant module :

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>${spring-boot-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring-boot-version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>5.0.8.RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.github.rockaport</groupId>
            <artifactId>alice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20190722</version>
        </dependency>
    </dependencies>

Thank you

Body:
I had same error. I added annotation BusJacksonAutoConfiguration. That resolved my problem.

So try to add this in your configuration:

@Import({BusJacksonAutoConfiguration.class, BusAutoConfiguration.class})


来源: stackexchange

问:
What is the purpose of using JSON.stringify()?
I'm using JSON.stringify in my react redux application. What's the purpose of JSON.stringify in the following context? Even without JSON.stringify it works, but yet I've been advised to use JSON.stringify.

```<code>if (JSON.stringify(earlyBird.eBird) !== JSON.stringify(prevProps.earlyBird.eBird)) {
</code>```

答: In very simple words Stringify converts objects to strings. Your code works because ultimately it's the same thing you are comparing in the if condition. Refer this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify</p>

ContentLicense: CC BY-SA 4.0

Body:
I'm using JSON.stringify in my react redux application. What's the purpose of JSON.stringify in the following context? Even without JSON.stringify it works, but yet I've been advised to use JSON.stringify.

if (JSON.stringify(earlyBird.eBird) !== JSON.stringify(prevProps.earlyBird.eBird)) {


问:
How to sum up values when the only connection is count?
```<code>SELECT Country.NAME, COUNT(Politics.DEPENDENT) as Number_of__dependent_countries
FROM Country
JOIN Politics ON Politics.DEPENDENT = Country.CODE
GROUP BY Country.NAME;
</code>```

I want to sum up the population(Country.Population) of the countries i counted.

Code to create the tables:

```<code>CREATE TABLE Politics
(Country VARCHAR(4) CONSTRAINT PoliticsKey PRIMARY KEY,
 Independence DATE,
 WasDependent VARCHAR(40),
 Dependent  VARCHAR(4),
 Government VARCHAR(120));
</code>```

```<code>CREATE TABLE Country
(Name VARCHAR(40) NOT NULL UNIQUE,
 Code VARCHAR(4) CONSTRAINT CountryKey PRIMARY KEY,
 Capital VARCHAR(40),
 Province VARCHAR(40),
 Area INTEGER CONSTRAINT CountryArea
   CHECK (Area >= 0),
 Population INTEGER CONSTRAINT CountryPop
   CHECK (Population >= 0));
</code>```

答:
UPDATE: You want to get the popultion sum of the dependent countries. The dependent countries are not even joined yet. You must join the country table again:

```<code>SELECT
  c.name,
  COUNT(*) as number_of_dependent_countries,
  SUM(cd.population) AS population_of_dependent_countries
FROM country c
JOIN politics p ON p.dependent = c.code
JOIN country cd ON cd.code = p.country
GROUP BY c.name
ORDER BY c.name;
</code>```

Demo: https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=5a1a354955464e427952c8c5811fca49

Original answer:

You want rows from country plus an aggregation, so either join the aggregation result:

```<code>SELECT
  c.name, c.population,
  COALESCE(d.countries, 0) AS number_of_dependent_countries
FROM country c
LEFT JOIN
(
  SELECT dependent, COUNT(*) AS countries
  FROM politics
  GROUP BY dependent
) d ON d.dependent = c.code
ORDER BY c.name;
</code>```

Or use a subquery in the select clause:

```<code>SELECT
  c.name, c.population,
  (
    SELECT COUNT(*)
    FROM politics p
    WHERE p.dependent = c.code
  ) AS number_of_dependent_countries
FROM country c
ORDER BY c.name;
</code>```

Body:
SELECT Country.NAME, COUNT(Politics.DEPENDENT) as Number_of__dependent_countries
FROM Country
JOIN Politics ON Politics.DEPENDENT = Country.CODE
GROUP BY Country.NAME;

I want to sum up the population(Country.Population) of the countries i counted.

Code to create the tables:

CREATE TABLE Politics
(Country VARCHAR(4) CONSTRAINT PoliticsKey PRIMARY KEY,
 Independence DATE,
 WasDependent VARCHAR(40),
 Dependent  VARCHAR(4),
 Government VARCHAR(120));

CREATE TABLE Country
(Name VARCHAR(40) NOT NULL UNIQUE,
 Code VARCHAR(4) CONSTRAINT CountryKey PRIMARY KEY,
 Capital VARCHAR(40),
 Province VARCHAR(40),
 Area INTEGER CONSTRAINT CountryArea
   CHECK (Area >= 0),
 Population INTEGER CONSTRAINT CountryPop
   CHECK (Population >= 0));

Body:
UPDATE: You want to get the popultion sum of the dependent countries. The dependent countries are not even joined yet. You must join the country table again:

SELECT
  c.name,
  COUNT(*) as number_of_dependent_countries,
  SUM(cd.population) AS population_of_dependent_countries
FROM country c
JOIN politics p ON p.dependent = c.code
JOIN country cd ON cd.code = p.country
GROUP BY c.name
ORDER BY c.name;

Demo: https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=5a1a354955464e427952c8c5811fca49

Original answer:

You want rows from country plus an aggregation, so either join the aggregation result:

SELECT
  c.name, c.population,
  COALESCE(d.countries, 0) AS number_of_dependent_countries
FROM country c
LEFT JOIN
(
  SELECT dependent, COUNT(*) AS countries
  FROM politics
  GROUP BY dependent
) d ON d.dependent = c.code
ORDER BY c.name;

Or use a subquery in the select clause:

SELECT
  c.name, c.population,
  (
    SELECT COUNT(*)
    FROM politics p
    WHERE p.dependent = c.code
  ) AS number_of_dependent_countries
FROM country c
ORDER BY c.name;


问:
How to split a string and use it inside a for loop in ant script?
I am having a list of machine ips in a ant property.

```<code><property name="machines" ip="10.10.10.1;10.10.10.2;10.10.10.3"/>
</code>```

I have to copy one file to all the machines(all the machines are windows machines). So I want to split this string and to use it inside a for loop. Inside that forloop i will execute the copy command.

```<code><exec executable="cmd.exe">
```
```
<arg line="/C COPY /Y sample.txt \\${machine_ip}\Shared_folder\sample.txt"/>
```
```
</exec>
</code>```

Now how to split and use it inside for loop?

答:
If you can't use ant-contrib, an alternative would be to write your own custom Ant task to split the string and execute your command for each token.

Alternatively, since you are executing a Windows-specific command anyway, you could do the split/loop logic in a batch script and exec that, passing the whole properties string.

ContentLicense: CC BY-SA 3.0

Body:
I am having a list of machine ips in a ant property.

<property name="machines" ip="10.10.10.1;10.10.10.2;10.10.10.3"/>

I have to copy one file to all the machines(all the machines are windows machines). So I want to split this string and to use it inside a for loop. Inside that forloop i will execute the copy command.

<exec executable="cmd.exe">

<arg line="/C COPY /Y sample.txt \\${machine_ip}\Shared_folder\sample.txt"/>

</exec>

Now how to split and use it inside for loop?


问:
How to reuse Django app into another project
I have made a user registration app in a Django project.
I want to add this app (reuse) into another project.
How can I do this ?</p>

答:
Django has the feature to create Reusable App.

please refer this docs


问:
Problem with printing - Inheritance, Polymorphism and toString
I am practicing how to use toString(), polymorphism and inheritance. Right now I have the code below and it has all the information that I want to print and it does print but I have some unwanted lines.

I just need the 1st and 3rd line but I'm not so sure why it's printing out the other 3 lines.

```<code>public class Test_toString{
    public static void main(String[] args){
        Car c = new Car();
        System.out.println(c.toString());

        NamedCar c2 = new NamedCar(160, 8, "green", "Pony");
        System.out.println(c2.toString());
    }
}

class Car{
    int speed;
    int gear;
    public String color;

    public Car(){
        speed = 100;
        gear = 5;
        color = "silver";
    }

    public Car(int speed, int gear, String color){
        this.speed = speed;
        this.gear = gear;
        this.color = color;
    }

    public String toString(){
        return "Car: " + speed + "km/h " + gear + " gears " +
        color + "\n" + super.toString();
    }
}

class NamedCar extends Car{
    public String name;

    public NamedCar(String name){
        super();
        this.name = name;
    }

    public NamedCar(int speed, int gear, String color, String name){
        this.speed = speed;
        this.gear = gear;
        this.color = color;
        this.name = name;
    }

    public String toString(){
        return "Car: " + speed + "km/h " + gear + " gears " +
        color + " " +  name + "\n" + super.toString();
    }
}
</code>```

答:
when you call super.toString() you are calling toString() method of parent class in your child class.

All the classes you define as a user are a child of Object class. so your calling Object.toString() method in this part of your code:

```<code>public String toString(){
    return "Car: " + speed + "km/h " + gear + " gears " +
    color + "\n" + super.toString();
}
</code>```

which is a part of toString() method of your Car class.

Body:
I am practicing how to use toString(), polymorphism and inheritance. Right now I have the code below and it has all the information that I want to print and it does print but I have some unwanted lines.

I just need the 1st and 3rd line but I'm not so sure why it's printing out the other 3 lines.

public class Test_toString{
    public static void main(String[] args){
        Car c = new Car();
        System.out.println(c.toString());

        NamedCar c2 = new NamedCar(160, 8, "green", "Pony");
        System.out.println(c2.toString());
    }
}

class Car{
    int speed;
    int gear;
    public String color;

    public Car(){
        speed = 100;
        gear = 5;
        color = "silver";
    }

    public Car(int speed, int gear, String color){
        this.speed = speed;
        this.gear = gear;
        this.color = color;
    }

    public String toString(){
        return "Car: " + speed + "km/h " + gear + " gears " +
        color + "\n" + super.toString();
    }
}

class NamedCar extends Car{
    public String name;

    public NamedCar(String name){
        super();
        this.name = name;
    }

    public NamedCar(int speed, int gear, String color, String name){
        this.speed = speed;
        this.gear = gear;
        this.color = color;
        this.name = name;
    }

    public String toString(){
        return "Car: " + speed + "km/h " + gear + " gears " +
        color + " " +  name + "\n" + super.toString();
    }
}

Body:
when you call super.toString() you are calling toString() method of parent class in your child class.

All the classes you define as a user are a child of Object class. so your calling Object.toString() method in this part of your code:

public String toString(){
    return "Car: " + speed + "km/h " + gear + " gears " +
    color + "\n" + super.toString();
}

which is a part of toString() method of your Car class.


问:
Task :react-native-webview:compileDebugJavaWithJavac FAILED
I keep getting this error, when I try running my React Native application after installing the react-native.webview package. Please what could I be doing wrong.</p>

```<code>info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1135 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details

> Task :react-native-webview:compileDebugJavaWithJavac

> Task :react-native-webview:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
79 actionable tasks: 14 executed, 65 up-to-date
C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                                                    ^
  symbol:   variable Q
  location: class VERSION_CODES
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 37s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                                                    ^
  symbol:   variable Q
  location: class VERSION_CODES
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 37s

    at makeError (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:174:9)
    at Promise.all.then.arr (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
</code>```

答:
I also have the same issue when I installed WebView.

To fix it, you need to update your compileSdkVersion to 29. While you are at it, you might as well update the buildToolsVersion. You can do that by changing these lines in your project's /android/build.gradle file.

```<code>buildscript {
    ext {
        …
        buildToolsVersion = "29.0.3"
        compileSdkVersion = 29
        …
    }
…
}
</code>```

Body:
I keep getting this error, when I try running my React Native application after installing the react-native.webview package. Please what could I be doing wrong.

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1135 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details

> Task :react-native-webview:compileDebugJavaWithJavac

> Task :react-native-webview:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
79 actionable tasks: 14 executed, 65 up-to-date
C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                                                    ^
  symbol:   variable Q
  location: class VERSION_CODES
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 37s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewModule.java:276: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                                                    ^
  symbol:   variable Q
  location: class VERSION_CODES
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Projects\React-Native\FUNAI\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-webview:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 37s

    at makeError (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:174:9)
    at Promise.all.then.arr (C:\Projects\React-Native\FUNAI\node_modules\execa\index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Body:
I also have the same issue when I installed WebView.

To fix it, you need to update your compileSdkVersion to 29. While you are at it, you might as well update the buildToolsVersion. You can do that by changing these lines in your project's /android/build.gradle file.

buildscript {
    ext {
        …
        buildToolsVersion = "29.0.3"
        compileSdkVersion = 29
        …
    }
…
}


问:
Live streaming using videojs-record and videojs
I'm trying to make a video chat inside my application, and using videojs-record + videojs to do so. videojs-record to record the webcam (which is already working), and videojs to reproduce the video in the other side. By using the timestamp event, with the timeSlice property, I've managed to split the recorded video by each second.

```<code>this.player = videojs('#myVideo', this.options, () => {});

var player = this.player
var that = this

this.player.on('startRecord', () => {
    that.segment = 0
});

player.on('timestamp', function() {
    if (player.recordedData && player.recordedData.length > 0) {
        var binaryData = player.recordedData[player.recordedData.length - 1]
        that.$emit('dataVideoEvent', {video:binaryData, segment_index:that.segment})
        that.segment += 1
    }
});
</code>```

So I've managed to upload the said segments to Amazon's S3, and have used a Python endpoint to return a HLS file containing the uploaded files:

```<code>duration = 1
totalDuration = len(list)
string = ('#EXTM3U\n'
            '#EXT-X-PLAYLIST-TYPE:EVENT\n'
            '#EXT-X-TARGETDURATION:3600\n'
            '#EXT-X-VERSION:3\n'
            '#EXT-X-MEDIA-SEQUENCE:0\n')
ended = False
now = datetime.utcnow().replace(tzinfo=pytz.utc)
for index, obj in enumerate(list):
    url = {retrieving url based in obj}
    string += '#EXTINF:{duration}, no desc\n{url}\n'.format(duration=duration, url=url)
    ended = (obj.created_at.replace(tzinfo=pytz.utc) + timedelta(seconds=10)) < now

if ended:
    string += '#EXT-X-ENDLIST'
</code>```

Although, that HLS file isn't working. The videojs player shows the proper full time of the video, but never starts to play it, and logs no errors. If I try to reproduce the video using Bitmovin's player demo, it says SOURCE_MANIFEST_INVALID.

I've also tried to create a XML+DASH file instead of a HLS one, but it didn't work as well. And I've also tried to change the videojs-record videoMimeType property to other values, like video/webm;codecs=vp8,opus or video/mp2t;codecs=vp8,opus, but it also didn't change a thing.

Also, the @action that returns the HLS file has a renderer_classes property using that renderer:

```<code>class HLSRenderer(BaseRenderer):
    media_type = 'application/x-mpegurl'
    format = 'm3u8'
    level_sep = '.'
    header = None
    labels = None
    writer_opts = None

    def render(self, data, media_type=None, renderer_context={}, writer_opts=None):
        return data
</code>```

And at last, I've configured CORS in that way in S3, in case that's relevant:

```<code><?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>Range</AllowedHeader>
</CORSRule>
</CORSConfiguration>
</code>```

And by the way, the @action is usually blocked so only the expected user can see it, but at this moment I've changed its permission_classes value to AllowAny, so I can test in websites like Bitmovin.

What exactly am I doing wrong?

答:
I gave up and ended up using Jitsi instead of videojs-record. I had to run it with an iframe within Vue, but it succeed where all the rest failed.

I've spent the last 18 days trying to make a live stream by myself, when I could make Jitsi work with my project in almost one single night. I recommend their Docker, it's pretty easy to set up.

https://github.com/jitsi/docker-jitsi-meet

Body:
I'm trying to make a video chat inside my application, and using videojs-record + videojs to do so. videojs-record to record the webcam (which is already working), and videojs to reproduce the video in the other side. By using the timestamp event, with the timeSlice property, I've managed to split the recorded video by each second.

this.player = videojs('#myVideo', this.options, () => {});

var player = this.player
var that = this

this.player.on('startRecord', () => {
    that.segment = 0
});

player.on('timestamp', function() {
    if (player.recordedData && player.recordedData.length > 0) {
        var binaryData = player.recordedData[player.recordedData.length - 1]
        that.$emit('dataVideoEvent', {video:binaryData, segment_index:that.segment})
        that.segment += 1
    }
});

So I've managed to upload the said segments to Amazon's S3, and have used a Python endpoint to return a HLS file containing the uploaded files:

duration = 1
totalDuration = len(list)
string = ('#EXTM3U\n'
            '#EXT-X-PLAYLIST-TYPE:EVENT\n'
            '#EXT-X-TARGETDURATION:3600\n'
            '#EXT-X-VERSION:3\n'
            '#EXT-X-MEDIA-SEQUENCE:0\n')
ended = False
now = datetime.utcnow().replace(tzinfo=pytz.utc)
for index, obj in enumerate(list):
    url = {retrieving url based in obj}
    string += '#EXTINF:{duration}, no desc\n{url}\n'.format(duration=duration, url=url)
    ended = (obj.created_at.replace(tzinfo=pytz.utc) + timedelta(seconds=10)) < now

if ended:
    string += '#EXT-X-ENDLIST'

Although, that HLS file isn't working. The videojs player shows the proper full time of the video, but never starts to play it, and logs no errors. If I try to reproduce the video using Bitmovin's player demo, it says SOURCE_MANIFEST_INVALID.

I've also tried to create a XML+DASH file instead of a HLS one, but it didn't work as well. And I've also tried to change the videojs-record videoMimeType property to other values, like video/webm;codecs=vp8,opus or video/mp2t;codecs=vp8,opus, but it also didn't change a thing.

Also, the @action that returns the HLS file has a renderer_classes property using that renderer:

class HLSRenderer(BaseRenderer):
    media_type = 'application/x-mpegurl'
    format = 'm3u8'
    level_sep = '.'
    header = None
    labels = None
    writer_opts = None

    def render(self, data, media_type=None, renderer_context={}, writer_opts=None):
        return data

And at last, I've configured CORS in that way in S3, in case that's relevant:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>Range</AllowedHeader>
</CORSRule>
</CORSConfiguration>

And by the way, the @action is usually blocked so only the expected user can see it, but at this moment I've changed its permission_classes value to AllowAny, so I can test in websites like Bitmovin.

What exactly am I doing wrong?


问:
How to get tfidf with pandas dataframe?
I want to calculate tf-idf from the documents below. I'm using python and pandas.

```<code>import pandas as pd
df = pd.DataFrame({'docId': [1,2,3],
               'sent': ['This is the first sentence','This is the second sentence', 'This is the third sentence']})
</code>```

First, I thought I would need to get word_count for each row. So I wrote a simple function:

```<code>def word_count(sent):
    word2cnt = dict()
    for word in sent.split():
        if word in word2cnt: word2cnt[word] += 1
        else: word2cnt[word] = 1
return word2cnt
</code>```

And then, I applied it to each row.

```<code>df['word_count'] = df['sent'].apply(word_count)
</code>```

But now I'm lost. I know there's an easy method to calculate tf-idf if I use Graphlab, but I want to stick with an open source option. Both Sklearn and gensim look overwhelming. What's the simplest solution to get tf-idf?

Title: How to get tfidf with pandas dataframe?

Body:
I want to calculate tf-idf from the documents below. I'm using python and pandas.

import pandas as pd
df = pd.DataFrame({'docId': [1,2,3],
               'sent': ['This is the first sentence','This is the second sentence', 'This is the third sentence']})

First, I thought I would need to get word_count for each row. So I wrote a simple function:

def word_count(sent):
    word2cnt = dict()
    for word in sent.split():
        if word in word2cnt: word2cnt[word] += 1
        else: word2cnt[word] = 1
return word2cnt

And then, I applied it to each row.

df['word_count'] = df['sent'].apply(word_count)

But now I'm lost. I know there's an easy method to calculate tf-idf if I use Graphlab, but I want to stick with an open source option. Both Sklearn and gensim look overwhelming. What's the simplest solution to get tf-idf?

Body:
A simple solution is to use texthero:

import texthero as hero
df['tfidf'] = hero.tfidf(df['sent'])

In [5]: df.head()
Out[5]:
   docId                         sent                                              tfidf
0      1   This is the first sentence  [0.3816141458138271, 0.6461289150464732, 0.381...
1      2  This is the second sentence  [0.3816141458138271, 0.0, 0.3816141458138271, ...
2      3   This is the third sentence  [0.3816141458138271, 0.0, 0.3816141458138271, ...


问:
Maven plugins are not downloading or resolving when I create a new project
I am very new to maven was about to start learning spring with maven but when I created my first project with maven in eclipse this error occurred and I think maven plugins are not getting downloaded. I have tried several solutions from stackoverflow but nothing worked.

Console Window is like :-

```<code>[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.097 s
[INFO] Finished at: 2020-06-01T21:17:39-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
</code>```

Error window is like this:-

Please see this screenshot for exact information of errors.

Screenshot attached

POM.xml file

```<code><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.anuragr07</groupId>
  <artifactId>springpractice</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</project>
</code>```

Solutions tried so far:-

Installing maven using help > install a new software option

Tried mvn install using cmd

Tried uncommenting proxy tag in setting.xml file

Tried 'https' instead of 'http' in proxy tag in settings.xml file

Tried reinstalling eclipse

and maybe more..

After mvn package

```<code>E:\Workspace\springpractice>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.anuragr07:springpractice >--------------------
[INFO] Building springpractice 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom

**Downloaded all the plugins**

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.831 s
[INFO] Finished at: 2020-06-01T23:52:35-07:00
[INFO] ------------------------------------------------------------------------

</code>```

I am really frustrated and searching for solutions from past 24 hours. Please help me resolve this.

Thanks!

答:
you have to designate maven goal.
in pom.xml, insert that

```<code><build>
    <defaultGoal>install</defaultGoal>

</build>
</code>```

I guess there is no defaultGoal in your pom.xml.

Body:
I am very new to maven was about to start learning spring with maven but when I created my first project with maven in eclipse this error occurred and I think maven plugins are not getting downloaded. I have tried several solutions from stackoverflow but nothing worked.

Console Window is like :-

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.097 s
[INFO] Finished at: 2020-06-01T21:17:39-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

Error window is like this:-

Please see this screenshot for exact information of errors.

Screenshot attached

POM.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.anuragr07</groupId>
  <artifactId>springpractice</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</project>

Solutions tried so far:-

Installing maven using help > install a new software option

Tried mvn install using cmd

Tried uncommenting proxy tag in setting.xml file

Tried 'https' instead of 'http' in proxy tag in settings.xml file

Tried reinstalling eclipse

and maybe more..

After mvn package

E:\Workspace\springpractice>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< com.anuragr07:springpractice >--------------------
[INFO] Building springpractice 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom

**Downloaded all the plugins**

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.831 s
[INFO] Finished at: 2020-06-01T23:52:35-07:00
[INFO] ------------------------------------------------------------------------

I am really frustrated and searching for solutions from past 24 hours. Please help me resolve this.

Thanks!

Body:
you have to designate maven goal.
in pom.xml, insert that

<build>
    <defaultGoal>install</defaultGoal>

</build>

I guess there is no defaultGoal in your pom.xml.


问:
jQuery / Safari Show/Hide issue with flash
Im using show/hide to load a 'loading' flash file whilst a form loads.

The div im trying to show contains an swf file

This works fine in all browsers except safari, which does not show the swf file upon clicking the submit button

ive got a test set up here...
https://www.paydaygap.co.uk/test.php

Im using...

```<code>$('#form').show();
$('#loading').hide();

$('.sendform').click(function(){

    $('#form').hide();
    $('#loading').show();

});
</code>```

and the hidden div which should show on clicking .sendform is...

```<code><div id="loading" style="padding:50px; text-align:center;">
<h1>This thing is loading</h1>
<p>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="300" >
    <param name="movie" value="lightboxform/loading.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="lightboxform/loading.swf" width="300" height="300" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
  </object>
</p>
</code>```

Any assistance greatly appreciated

答:
I would think that the other browsers are failing to render the flash when the container is hidden.  Try this instead:

First, instead of not showing the loading div, set it's position to absolute, and move it off the page:

```<code>#loading { display:block;position:absolute;left:-9999px;}
</code>```

Then try this:

```<code>$('.sendform').click(function(){
    $('#form').hide();
    $('#loading').css({
        'position' : 'relative',
        'left'     : '0px'
    });
});
</code>```

Body:
Im using show/hide to load a 'loading' flash file whilst a form loads.

The div im trying to show contains an swf file

This works fine in all browsers except safari, which does not show the swf file upon clicking the submit button

ive got a test set up here...
https://www.paydaygap.co.uk/test.php

Im using...

$('#form').show();
$('#loading').hide();

$('.sendform').click(function(){

    $('#form').hide();
    $('#loading').show();

});

and the hidden div which should show on clicking .sendform is...

This thing is loading

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="300" >
    <param name="movie" value="lightboxform/loading.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="lightboxform/loading.swf" width="300" height="300" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
  </object>

Any assistance greatly appreciated

Body:
I would think that the other browsers are failing to render the flash when the container is hidden.  Try this instead:

First, instead of not showing the loading div, set it's position to absolute, and move it off the page:

#loading { display:block;position:absolute;left:-9999px;}

Then try this:

$('.sendform').click(function(){
    $('#form').hide();
    $('#loading').css({
        'position' : 'relative',
        'left'     : '0px'
    });
});


问:
Git: Merging stashed changes to head
I have the problem with applying stashed changes from git.

I had a clean working directory.

I modified several files in the working directory.

I stashed those changes.

I was back to the clean working directory from (1)

I created and modified several files.

I committed these changes.

I unstashed the changes from (2)

After (7) I ended up where I was before at (2), and I suppose that'S the expected behavior. But not for me, since I thought after (7) I would have the changes from (5) and the stash is applied onto that changes. But for example, files created in (5) are deleted.

I am pretty sure I use this feature wrongly. Can anyone give advice, how I can actually apply the stashed changes to my working directory so that the changes in (5) are not lost?

UPDATE 1: Due to my IDE I am in the situation that I can roll back to the state where I stashed and due to Git I have can revert to the state of the implementation I did while stuff was stashed. I just don't know how to merge those two.

答:
If you have committed your changes before unstashing i.e git stash pop, these modified files should be un-staged on the top of the previous commit. You might get these files modified or there would be a merge conflict. Chances are while resolving the merge conflicts, you'd have kept the changes from the unstashing and discarded the changes from the commit.

In any case, git reflog would  tell you the history of what exactly happened.

Title: Git: Merging stashed changes to head