You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason a byte array can't be serialized if it's in a map. I added a failing test to show this nivekuil@3b49737 which throws an exception Caused by: com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [BLOB <-> [B]
The text was updated successfully, but these errors were encountered:
If you are looking for a BLOB codec, the right call is CachingCodecRegistry.codecFor(DataType.BLOB, ByteBuffer.class). Indeed, there is a default BLOB codec registered in the driver that converts BLOB columns to ByteBuffer objects.
But, as explained in the docs, this method does not accept covariant classes. So if you try, say, CachingCodecRegistry.codecFor(DataType.BLOB, HeapByteBuffer.class) – then the method will throw CodecNotFoundException – even if HeapByteBuffer is a subtype of ByteBuffer.
This is probably not the right way to fix it, but this unblocks me for now df69e50
For some reason a byte array can't be serialized if it's in a map. I added a failing test to show this nivekuil@3b49737 which throws an exception
Caused by: com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [BLOB <-> [B]
The text was updated successfully, but these errors were encountered: