vertx-redis-client: java.lang.ClassCastException: java.lang.Long cannot be cast to [Lio.vertx.redis.impl.Reply;
From @hansen2014 on June 28, 2016 9:58
RedisTransaction rtx = redisClient.transaction();
rtx.multi(r -> {
String setKey = RepositoryHelper.createKSKey("SessionScreenSymbol", clientCd, sessionId, viewNum);
List<String> keyList = new ArrayList<>();
for (String data : delS) {
keyList.add(data);
rtx.del(data, r1 -> {
GLog.info("trans del executing ..., result: {} ", r1);
});
}
if (delS.size() > 0) {
rtx.sremMany(setKey, keyList, rst -> {
GLog.info("trans strm executing ..., result: {}", rst);
});
}
rtx.exec(handler);
});
sometimes, will throw exception like that , and then, can not receive the reply. : fatal: Unhandled exception java.lang.ClassCastException: java.lang.Long cannot be cast to [Lio.vertx.redis.impl.Reply; at io.vertx.redis.impl.Reply.asType(Reply.java:94) at io.vertx.redis.impl.Reply.asType(Reply.java:156) at io.vertx.redis.impl.RedisConnection.handleReply(RedisConnection.java:441) at io.vertx.redis.impl.ReplyParser.handle(ReplyParser.java:180) at io.vertx.redis.impl.ReplyParser.handle(ReplyParser.java:21) at io.vertx.core.net.impl.NetSocketImpl.handleDataReceived(NetSocketImpl.java:312) at io.vertx.core.net.impl.VertxNetHandler.lambda$channelRead$0(VertxNetHandler.java:67) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$3(ContextImpl.java:357) at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor.lambda$new$0(OrderedExecutorFactory.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
2016-06-28 17:57:57.558 [vert.x-eventloop-thread-7] ERROR EAGLE.DEFAULT - system error. io.vertx.core.eventbus.ReplyException: Timed out after waiting 5000(ms) for a reply. address: 136 at io.vertx.core.eventbus.impl.HandlerRegistration.sendAsyncResultFailure(HandlerRegistration.java:118) ~[vertx-core-3.3.0.jar:na] at io.vertx.core.eventbus.impl.HandlerRegistration.lambda$new$0(HandlerRegistration.java:65) ~[vertx-core-3.3.0.jar:na] at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:769) ~[vertx-core-3.3.0.jar:na] at io.vertx.core.impl.VertxImpl$InternalTimerHandler.handle(VertxImpl.java:740) ~[vertx-core-3.3.0.jar:na] at io.vertx.core.impl.ContextImpl.lambda$wrapTask$3(ContextImpl.java:359) ~[vertx-core-3.3.0.jar:na] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:339) ~[netty-common-4.1.1.Final.jar:4.1.1.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:393) ~[netty-transport-4.1.1.Final.jar:4.1.1.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742) ~[netty-common-4.1.1.Final.jar:4.1.1.Final] at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_91]
Copied from original issue: eclipse/vert.x#1482
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (7 by maintainers)
Commits related to this issue
- Fix #61: synchronize around queue access and socket writes otherwise the pipeline will get out of order and responses are not aligned with handlers — committed to vert-x3/vertx-redis-client by pmlopes 8 years ago
- Merge pull request #62 from vert-x3/issues/issue-61 Fix #61: synchronize around queue access and socket writes otherwise … — committed to vert-x3/vertx-redis-client by vietj 8 years ago
Thanks for the fast feedback as always.