current position:Home>The redis session problem runs well locally. As soon as it arrives online, it crazy reports exceptions. It starts to report when it starts. And the function can be used normally

The redis session problem runs well locally. As soon as it arrives online, it crazy reports exceptions. It starts to report when it starts. And the function can be used normally

2022-02-02 23:30:59 CSDN Q & A

Environmental Science springboot 1.5.3 Alibaba cloud redis 4.0 Community Edition
2021-12-17 13:52:38,465 WARN (RedisMessageListenerContainer.java:291)- Execution of message listener failed, and no ErrorHandler has been set.
org.springframework.data.redis.serializer.SerializationException: Could not read JSON: Unexpected character ('?' (code 172)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: [B@4e9c56cc; line: 1, column: 2]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('?' (code 172)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: [B@4e9c56cc; line: 1, column: 2]
at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:130)
at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:109)
at org.springframework.session.data.redis.RedisOperationsSessionRepository.onMessage(RedisOperationsSessionRepository.java:503)
at org.springframework.data.redis.listener.RedisMessageListenerContainer.executeListener(RedisMessageListenerContainer.java:249)
at org.springframework.data.redis.listener.RedisMessageListenerContainer.processMessage(RedisMessageListenerContainer.java:239)
at org.springframework.data.redis.listener.RedisMessageListenerContainer$1.run(RedisMessageListenerContainer.java:967)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('?' (code 172)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: [B@4e9c56cc; line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:456)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2689)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:878)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:772)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3850)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3799)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2945)
at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:128)




Refer to the answer 1:

json Serialization problem Look at the production environment from redis Logic of value in Find the corresponding key Look at the value inside




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022330578776.html

Random recommended