org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient

Spring JIRA | Mark Paluch | 11 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Application startup fails when using {{@EnableRedisRepositories}} and Redis Cluster with the lettuce driver. Spring Boot enables by default Redis Repositories when Spring Data Redis is on the class path. Redis Repositories with Cluster and lettuce can't be resolved to a working scenario right. lettuce driver 3.x does not support Redis Cluster with Pub/Sub, only lettuce 4.2 has support for Redis Cluster with Pub/Sub. A possible workaround could be DATAREDIS-505 to run with disabled listeners. {code} 2016-05-03 14:02:21.324 ERROR 13042 --- [enerContainer-1] o.s.d.r.l.RedisMessageListenerContainer : SubscriptionTask aborted with exception: org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient at org.springframework.data.redis.FallbackExceptionTranslationStrategy.getFallback(FallbackExceptionTranslationStrategy.java:48) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:38) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:327) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:3063) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:779) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:746) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65] Caused by: java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient at org.springframework.data.redis.connection.lettuce.LettuceConnection.switchToPubSub(LettuceConnection.java:3426) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:3060) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] ... 3 common frames omitted {code}

    Spring JIRA | 11 months ago | Mark Paluch
    org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient
  2. 0

    Application startup fails when using {{@EnableRedisRepositories}} and Redis Cluster with the lettuce driver. Spring Boot enables by default Redis Repositories when Spring Data Redis is on the class path. Redis Repositories with Cluster and lettuce can't be resolved to a working scenario right. lettuce driver 3.x does not support Redis Cluster with Pub/Sub, only lettuce 4.2 has support for Redis Cluster with Pub/Sub. A possible workaround could be DATAREDIS-505 to run with disabled listeners. {code} 2016-05-03 14:02:21.324 ERROR 13042 --- [enerContainer-1] o.s.d.r.l.RedisMessageListenerContainer : SubscriptionTask aborted with exception: org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient at org.springframework.data.redis.FallbackExceptionTranslationStrategy.getFallback(FallbackExceptionTranslationStrategy.java:48) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:38) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:327) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:3063) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:779) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:746) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65] Caused by: java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient at org.springframework.data.redis.connection.lettuce.LettuceConnection.switchToPubSub(LettuceConnection.java:3426) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:3060) ~[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na] ... 3 common frames omitted {code}

    Spring JIRA | 11 months ago | Mark Paluch
    org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient
  3. 0

    Help:basic RMI question

    Google Groups | 2 decades ago | Paolo De Lutiis
    java.lang.ClassCastException: serverPackage.ServerClass_Stub at clientPackage.myApplet.init(myApplet.java:line#) at sun.applet.AppletPanel.run(AppletPanel.java:273) at java.lang.Thread.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  6. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient

      at org.springframework.data.redis.connection.lettuce.LettuceConnection.switchToPubSub()
    2. Spring Data Redis
      RedisMessageListenerContainer$SubscriptionTask.run
      1. org.springframework.data.redis.connection.lettuce.LettuceConnection.switchToPubSub(LettuceConnection.java:3426)[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na]
      2. org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:3060)[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na]
      3. org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:779)[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na]
      4. org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:746)[spring-data-redis-1.8.0.DATAREDIS-507-SNAPSHOT.jar:na]
      4 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_65]
      1 frame