Jedis.hmset() has thrown a ClassCastException

java.lang.ClassCastException
Javadoc
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:
    Object x = new Integer(0);
    System.out.println((String)x);
@author unascribed @since JDK1.0
at redis.clients.jedis.Connection.getStatusCodeReply
(Source)
at redis.clients.jedis.Jedis.hmset
(Source)

Typical Exception Messages

  1. java.util.ArrayList cannot be cast to [B
  2. java.lang.Integer cannot be cast to java.lang.String

Origin

We have seen this error pattern in the following webpages (1)

  1. graemerochervia GitHub2 years ago
    java.lang.Integer cannot be cast to java.lang.String