readerIndex(0) + length(1) exceeds writerIndex(0)

Hi, I am getting below exception for an app which connects to couchbase db.can anyone tell what is the cause of this ?
com.couchbase.client.core.CouchbaseException: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(1) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 256)

Hi Saikiran, I know this is pretty old but how did you fix it?

For anyone hitting this exception, it could indicate a bug decoding a protocol response. As a first step please update your software to the latest. If that fails then please post a minimal piece of code (or upload a small project) that reproduces the error.

1 Like