-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
RedisSetCommands.isMember(K key, Object... objects)
throws ClassCastException
#2759
Comments
isMember(K key, Object... objects)
throws ClassCastException
isMember(K key, Object... objects)
throws ClassCastException
RedisSetCommands.isMember(K key, Object... objects)
throws ClassCastException
Could you please create a simple test case reproducing the issue? Spring Data Redis already contains a test case for The difference between Redis standalone and cluster should not matter in this case. I distilled this down into a more directed test case matching your setup; see here. All tests pass with Jedis and Lettuce in Spring Data Redis You cannot simply assume the You have to consider the return value from the underlying Redis driver API (Jedis or Lettuce) used to invoke the set member command. In the case of Jedis, Spring Data Redis calls Even if you are indirectly calling the SD Redis In the case of Lettuce, Spring Data Redis simply calls Lettuce's
I wonder if you possibly altered your configuration in a non-prescribed, incompatible manner? |
@thanbv1510 Please check if the Redisson dependency has been added. Remove it to resolve the issue, or alternatively, use Redisson's native API. |
Yes, I using redisson with spring-data-redis, code correct if I remove redisson dependency |
I can possibly see how Redisson might have caused this Of course, this was not apparent from the provided Stack Trace above. In general, Spring Data Redis does not integrate with any other library, such as Redisson, only other Spring libs (e.g. Spring Data Commons, the core Spring Framework, etc) and the Redis drivers (Jedis and Lettuce) directly. In particular, all integration of Redisson with Spring is handled by the Redisson project itself; see Features, toward the bottom of the list. I will be closing this ticket as |
Fixed in redisson/redisson#6209 |
Java 17
,Redis Cluster version 7.0.10
andspring-data-redis 3.1.2
isMember.put(objects[i], result.get(i));
The text was updated successfully, but these errors were encountered: