Custom converter not used during deserialization

Using Java SDK v2.7

I have an enum that hold an internal value - a Number.
When the enum is written into cb it is converted to its value. using a cb Converter. This works fine.

On read however, the sdk uses instead of my customer converter and throws :

java.lang.ArrayIndexOutOfBoundsException: Index 50 out of bounds for length 3

In this exemple the value stored is an int 50.
Is there a way to give some precedence to my converter or to specifically set the converter to use ?

Converter declaration
    public CouchbaseCustomConversions customConversions() {
        List<Converter<?, ?>> converters = new ArrayList<>();
        return new CouchbaseCustomConversions(converters);

    public enum TaskPriorityToNumberConverter implements Converter<TaskPriority, Number> {

        public Number convert(TaskPriority source) {
            return source == null ? null : source.getOrder();

     * Simple singleton to convert from {@link Number} {@link BigDecimal} representation.
    public enum NumberToTaskPriorityConverter implements Converter<Number, TaskPriority> {

        public TaskPriority convert(Number source) {
            return source == null ? null : TaskPriority.forValue(source);
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;


public enum TaskPriority implements OrderedEnum {

    private final long order;

    TaskPriority(long order) {
        this.order = order;

    public long getOrder() {
        return order;

    public static TaskPriority forValue(String value) {
        return valueOf(, value));

    public static TaskPriority forValue(Number order) {
        return Stream.of(TaskPriority.values())
            .filter(c -> order.equals(c.getOrder()))

    public String toValue() {
        return, name());

The first thing I would try is changing your converters to be Integer instead of Number converters, in case it does not consider your Number converter as suitable. Also log (or System.out.println) in your customConversions() to ensure the registration is performed.
I have been going by
Do (4) and (5) help? It includes an example for Enums, yours would be NumberToEnum… (your convert() method would be different). And also an EnumToNumber… for writing.
What versing of spring-data-couchbase are you using?
Can you provide the stack-trace of the ArrayIndexOutOfBoundsException exception?