Skip to content

ClassCastException in 2.1.0 (getBinaryBulkReply) #359

@ex-nerd

Description

@ex-nerd

Sorry, my logs truncated this.

java.lang.ClassCastException: java.lang.Long cannot be cast to [B
at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:182)
at redis.clients.jedis.Connection.getBulkReply(Connection.java:171)
at redis.clients.jedis.Jedis.get(Jedis.java:67)

I'm using a connection pool, and noticed that there was an earlier exception:

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at redis.clients.jedis.Protocol.process(Protocol.java:79)
at redis.clients.jedis.Protocol.read(Protocol.java:131)
at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:182)
at redis.clients.jedis.Connection.getBulkReply(Connection.java:171)
at redis.clients.jedis.Jedis.get(Jedis.java:67)

It looks like my code was not calling returnBrokenResource() on the broken resource, and returning it to the pool as normal. However, Jedis should probably still do something to catch that class cast exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions