pinpoint-apm/pinpoint · error · ConfigurationException

Unsupported type:<typeName>

Error message

Unsupported type:<typeName>

What it means

ValueAnnotationProcessor.parse() converts a resolved property string into the annotated field/setter type. If the type is none of the supported ones (enum, String, int/long/boolean/double/float/short/byte and their wrappers, char/Character), it throws ConfigurationException with the fully-qualified type name. Unlike error 270, this is thrown before any injection happens and applies to both fields and methods.

Source

Thrown at commons-config/src/main/java/com/navercorp/pinpoint/common/config/util/ValueAnnotationProcessor.java:170

            return value;
        } else if (type == int.class || type == Integer.class) {
            return Integer.parseInt(value);
        } else if (type == long.class || type == Long.class) {
            return Long.parseLong(value);
        } else if (type == boolean.class || type == Boolean.class) {
            return Boolean.parseBoolean(value);
        } else if (type == double.class || type == Double.class) {
            return Double.parseDouble(value);
        } else if (type == float.class || type == Float.class) {
            return Float.parseFloat(value);
        } else if (type == short.class || type == Short.class) {
            return Short.parseShort(value);
        } else if (type == byte.class || type == Byte.class) {
            return Byte.parseByte(value);
        } else if (type == char.class || type == Character.class) {
            return parseChar(value);
        }
        throw new ConfigurationException("Unsupported type:" + type.getName());
    }

    private char parseChar(String value) {
        if (value.length() != 1) {
            throw new IllegalArgumentException("Invalid value:" + value);
        }
        return value.charAt(0);
    }

    private void injectField(Field field, Object target, String value) {
        final Class<?> fieldType = field.getType();

        try {
            final Object parsedValue = parse(fieldType, value);
            if (parsedValue != null) {
                try {
                    setAccessible(field);
                    field.set(target, parsedValue);

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Change the field/setter type to a supported one (String, primitive/wrapper, char, or enum)
  2. Keep the stored type as String and convert it in application code after injection
  3. If a numeric wrapper like BigDecimal is needed, store as String and parse manually in the constructor

Example fix

// before
@Value("${timeout.ms}")
private BigDecimal timeoutMs;
// after
@Value("${timeout.ms}")
private String timeoutMsString; // parse to BigDecimal in constructor/after load
// or simply
@Value("${timeout.ms}")
private long timeoutMs;
Defensive patterns

Strategy: validation

Validate before calling

Class<?> t = field.getType();
Set<Class<?>> supported = Set.of(String.class, Integer.class, Long.class, Boolean.class,
    Double.class, Float.class, Short.class, Byte.class, Character.class,
    int.class, long.class, boolean.class, double.class, float.class, short.class, byte.class, char.class);
if (!supported.contains(t) && !t.isEnum()) throw new IllegalStateException("Unsupported type: " + t.getName());

Try / catch

try {
    processor.process(configInstance, resolver);
} catch (ConfigurationException e) {
    log.error("Unsupported @Value type: {}", e.getMessage());
}

Prevention

When it happens

Trigger: A @Value-annotated field or single-arg setter whose declared type is an unsupported class (e.g. java.util.Date, BigDecimal, URL, arrays, generic collections) is processed by process().

Common situations: Developers porting Spring configuration classes into Pinpoint's lightweight config mechanism; adding typed config fields assuming automatic converters exist; upgrading code where a field type was changed from a supported primitive to an object type.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/e6af6f67e485f9fc. Report an issue: GitHub.