aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

ClassCastException when executing commands #139

Closed andredasilvapinto closed 5 years ago

andredasilvapinto commented 5 years ago

I'm getting java.lang.ClassCastException: com.aerospike.client.async.NettyRecover$InboundHandler cannot be cast to com.aerospike.client.async.NettyCommand$InboundHandler after enabling timeout delays.

I believe this is caused by this unchecked cast https://github.com/aerospike/aerospike-client-java/blob/master/client/src/com/aerospike/client/async/NettyCommand.java#L256 given that NettyRecover$InboundHandlers are added to the pipeline here: https://github.com/aerospike/aerospike-client-java/blob/master/client/src/com/aerospike/client/async/NettyRecover.java#L94

BrianNichols commented 5 years ago

That is a bug. I'm away from the office this week. Can you wait till Monday for the fix?

In the meantime, I recommend disabling timeoutDelay when using Netty. timeoutDelay should work for direct NIO.

BrianNichols commented 5 years ago

Java client 4.4.3 contains the fix:

https://www.aerospike.com/download/client/java/4.4.3/