First, sorry for my poor english, i'm not very fluent. I'm getting an class clast exception. I thought it could be due to the implementation of my JedisPool or the way i release jedis instance, so here the code
static {
JedisPoolConfig config = new JedisPoolConfig();
config.setTestOnBorrow(true);
pool = new JedisPool(config, "localhost");
}
public static Set<String> testgetEntries() {
Jedis j = null;
try {
j = pool.getResource();
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
try {
String key =" something"
double minmaxScore = 23
Set<String> result = j.zrangeByScore(key, minmaxScore, minmaxScore);
return result;
} catch (JedisConnectionException e) {
LOGGER.error(e.getMessage(), e);
if (j != null) {
pool.returnBrokenResource(j);
j = null;
}
} finally {
if(j != null)
pool.returnResource(j);
}
return new HashSet<String>();
}
- [B cannot be cast to java.util.List
java.lang.ClassCastException: [B cannot be cast to java.util.List
at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:202)
at redis.clients.jedis.Connection.getMultiBulkReply(Connection.java:195)
at redis.clients.jedis.Jedis.zrangeByScore(Jedis.java:2023)
[..]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)