Sachini Wickramaratne
Sachini Wickramaratne

Reputation: 599

redis opsForZSet error

Im using redis to store certain keys and a set of values where I want t remove a specific valuer when the corresponding operations to that particular value is done.

My code segment for removing the particular value is

redisOperations.opsForZSet().remove(key, task); and /i'm getting the error

Exception in thread "scheduler-polling" java.lang.NoSuchMethodError: org.springframework.data.redis.core.ZSetOperations.remove(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Boolean;

my key is a String and the task is also a string. I see no reason why it doesn't accept this.

Upvotes: 0

Views: 571

Answers (1)

Moshe Arad
Moshe Arad

Reputation: 3733

According to your exception you are trying to return a Boolean value, while this method returns a Long value according to documentation.

Take a look in the documentation:

http://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/core/ZSetOperations.html#remove-K-java.lang.Object...-

Upvotes: 1

Related Questions