Looks starting from version 3.1.5 of the client the , when a customer json serializer is provided, the sdk is wrapping the serializer in JsonValueSerializerWrapper, and this did not have an implementation for the method that take a TypeRef object as input. This causing the above error.
<T> T deserialize(TypeRef<T> target, byte[] input)
This will be fixed in Java SDK 3.2.5. In the mean time, a workaround is to get the document content as a byte array and call the custom JsonSerializer yourself. For example:
JsonSerializer customSerializer = // get it from somewhere
GetResult result = collection.get("myWidget", GetOptions.getOptions()
.transcoder(RawJsonTranscoder.INSTANCE));
byte[] contentBytes = result.contentAs(byte[].class);
List<Widget> widgets = customSerializer.deserialize(
new TypeRef<List<Widget>>(){}, contentBytes);
This also illustrates how getting the document content as a byte array is harder than it should be. Tracking that as JCBC-1898.