Closed
Description
Hi,
When I try to call the initConnection() on my clustered redis, i get the error java.lang.ClassCastException: io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl cannot be cast to io.lettuce.core.api.StatefulRedisConnection
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:975)
looking at the code it seems like the class cast is only for the StatefulRedisConnection, where as the validateConnection() supports both StatefulRedisConnection and StatefulRedisClusterConnection.
any one faced this before? on how to achieve this?
We are doing lazy initialisation to the redis cluster.
Please help.
Thanks.