alibaba/nacos · error · IllegalArgumentException

Plugin config value is not a number: {}

Error message

Plugin config value is not a number: {}

What it means

Error "Plugin config value is not a number: {}" thrown in alibaba/nacos.

Source

Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/config/PluginConfigBasicChecker.java:162

            case NUMBER:
                validateNumber(definition.getKey(), value);
                break;
            case BOOLEAN:
                validateBoolean(definition.getKey(), value);
                break;
            case ENUM:
                validateEnum(definition, value);
                break;
            default:
                break;
        }
    }
    
    private void validateNumber(String key, String value) {
        try {
            new BigDecimal(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException("Plugin config value is not a number: " + key, e);
        }
    }
    
    private void validateBoolean(String key, String value) {
        if (!"true".equalsIgnoreCase(value) && !"false".equalsIgnoreCase(value)) {
            throw new IllegalArgumentException("Plugin config value is not a boolean: " + key);
        }
    }
    
    private void validateEnum(ConfigItemDefinition definition, String value) {
        if (definition.getEnumValues() != null && !definition.getEnumValues().isEmpty()
            && !definition.getEnumValues().contains(value)) {
            throw new IllegalArgumentException("Plugin config value is not in enum values: "
                + definition.getKey());
        }
    }
}

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Review the input and runtime state for plugin config not number, correct the reported problem, and retry.

When it happens

Trigger: Thrown at core/src/main/java/com/alibaba/nacos/core/plugin/config/PluginConfigBasicChecker.java:162 when the library encounters an invalid state.

Common situations: A numeric plugin config key received a non-numeric value.


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/2761cb80c459068d. Report an issue: GitHub.