Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lettuce set and get method IllegalStateException:ValueOutput does not support set(long) #1958

Closed
zhangjianleittntty opened this issue Jan 6, 2022 · 2 comments
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@zhangjianleittntty
Copy link

zhangjianleittntty commented Jan 6, 2022

Bug Report

Current Behavior

I have two docker online environment.It's A and B.
Springboot version: 2.4.11
lettuce version: 6.0.8

First be set(String), than running get(String). Operation normal in the A, but B throw exception,following:

`

exception: org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is 
   java.lang.IllegalStateException: io.lettuce.core.output.ValueOutput does not support set(long), dubbo version: 2.7.14, current host:  org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is 
       java.lang.IllegalStateException: io.lettuce.core.output.ValueOutput does not support set(long)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.getFallback(FallbackExceptionTranslationStrategy.java:53)
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:43)
at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:274)
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:800)	
at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.get(LettuceStringCommands.java:70)	
at org.springframework.data.redis.connection.DefaultedRedisConnection.get(DefaultedRedisConnection.java:267)
at org.springframework.data.redis.core.DefaultValueOperations$1.inRedis(DefaultValueOperations.java:57)
at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:60)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:222)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)
at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:53)	
at cn.com.esgcc.gwtrip.utils.redis.RedisUtil.get(RedisUtil.java:150)

`

Stack trace
if (RedisUtil.hasKey(key)) {

            String value = String.valueOf(RedisUtil.get(key));
            return JSON.parseObject(value, TrainStopStationDto.class);
        } else {
            SupResponse<TrainStopStationDto> supResponse = selectServiceBiz.queryTrainStopStation(req);
            if (!Objects.isNull(supResponse.getData()) && CollectionUtils.isNotEmpty(supResponse.getData().getStopStationInfos())) {
                RedisUtil.set(key, JSON.toJSONString(supResponse.getData()), 12, TimeUnit.HOURS);
                return supResponse.getData();
            }
        }

Input Code

Input Code
// your code here;

Expected behavior/code

Environment

  • Lettuce version(s): [e.g. lettuce-core:6.0.8.RELEASE]
  • Redis version: [e.g. 3.2.0]

Possible Solution

Additional context

@mp911de
Copy link
Collaborator

mp911de commented Jan 11, 2022

Can you provide a minimal reproducer using Lettuce only to reproduce the issue?

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Jan 11, 2022
@mp911de
Copy link
Collaborator

mp911de commented Jan 21, 2022

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@mp911de mp911de closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants