{"record":{"id":"e6af6f67e485f9fc","repo":"pinpoint-apm/pinpoint","slug":"unsupported-type-typename","errorCode":null,"errorMessage":"Unsupported type:<typeName>","messagePattern":"Unsupported type:<typeName>","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"commons-config/src/main/java/com/navercorp/pinpoint/common/config/util/ValueAnnotationProcessor.java","lineNumber":170,"sourceCode":"            return value;\n        } else if (type == int.class || type == Integer.class) {\n            return Integer.parseInt(value);\n        } else if (type == long.class || type == Long.class) {\n            return Long.parseLong(value);\n        } else if (type == boolean.class || type == Boolean.class) {\n            return Boolean.parseBoolean(value);\n        } else if (type == double.class || type == Double.class) {\n            return Double.parseDouble(value);\n        } else if (type == float.class || type == Float.class) {\n            return Float.parseFloat(value);\n        } else if (type == short.class || type == Short.class) {\n            return Short.parseShort(value);\n        } else if (type == byte.class || type == Byte.class) {\n            return Byte.parseByte(value);\n        } else if (type == char.class || type == Character.class) {\n            return parseChar(value);\n        }\n        throw new ConfigurationException(\"Unsupported type:\" + type.getName());\n    }\n\n    private char parseChar(String value) {\n        if (value.length() != 1) {\n            throw new IllegalArgumentException(\"Invalid value:\" + value);\n        }\n        return value.charAt(0);\n    }\n\n    private void injectField(Field field, Object target, String value) {\n        final Class<?> fieldType = field.getType();\n\n        try {\n            final Object parsedValue = parse(fieldType, value);\n            if (parsedValue != null) {\n                try {\n                    setAccessible(field);\n                    field.set(target, parsedValue);","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/commons-config/src/main/java/com/navercorp/pinpoint/common/config/util/ValueAnnotationProcessor.java#L152-L188","documentation":"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.","triggerScenarios":"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().","commonSituations":"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.","solutions":["Change the field/setter type to a supported one (String, primitive/wrapper, char, or enum)","Keep the stored type as String and convert it in application code after injection","If a numeric wrapper like BigDecimal is needed, store as String and parse manually in the constructor"],"exampleFix":"// before\n@Value(\"${timeout.ms}\")\nprivate BigDecimal timeoutMs;\n// after\n@Value(\"${timeout.ms}\")\nprivate String timeoutMsString; // parse to BigDecimal in constructor/after load\n// or simply\n@Value(\"${timeout.ms}\")\nprivate long timeoutMs;","handlingStrategy":"validation","validationCode":"Class<?> t = field.getType();\nSet<Class<?>> supported = Set.of(String.class, Integer.class, Long.class, Boolean.class,\n    Double.class, Float.class, Short.class, Byte.class, Character.class,\n    int.class, long.class, boolean.class, double.class, float.class, short.class, byte.class, char.class);\nif (!supported.contains(t) && !t.isEnum()) throw new IllegalStateException(\"Unsupported type: \" + t.getName());","typeGuard":null,"tryCatchPattern":"try {\n    processor.process(configInstance, resolver);\n} catch (ConfigurationException e) {\n    log.error(\"Unsupported @Value type: {}\", e.getMessage());\n}","preventionTips":["Use only String/primitive/wrapper/enum field types with @Value","Never annotate fields of BigDecimal, Date, URL, arrays, or collections with @Value","Keep the raw value as String and convert manually after processing when needed"],"tags":["java","reflection","configuration","unsupported-type"],"backgroundTag":"unsupported-config-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}