{"record":{"id":"7afd2f5e69866efe","repo":"pinpoint-apm/pinpoint","slug":"unsupported-datatype-datatype","errorCode":null,"errorMessage":"unsupported DataType:${dataType}","messagePattern":"unsupported DataType:(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/AnnotationTranscoder.java","lineNumber":100,"sourceCode":"            case CODE_BOOLEAN_FALSE -> Boolean.FALSE;\n            case CODE_INT -> BytesUtils.bytesToSVar32(data, 0);\n            case CODE_LONG -> BytesUtils.bytesToSVar64(data, 0);\n            case CODE_BYTE -> data[0];\n            case CODE_SHORT ->\n                // need short casting\n                    (short) BytesUtils.bytesToSVar32(data, 0);\n            case CODE_FLOAT -> Float.intBitsToFloat(ByteArrayUtils.bytesToInt(data, 0));\n            case CODE_DOUBLE -> Double.longBitsToDouble(ByteArrayUtils.bytesToLong(data, 0));\n            case CODE_BYTEARRAY -> data;\n            case CODE_NULL -> null;\n            case CODE_TOSTRING -> decodeString(data);\n            case CODE_INT_STRING -> decodeIntStringValue(data);\n            case CODE_INT_STRING_STRING -> decodeIntStringStringValue(data);\n            case CODE_STRING_STRING -> decodeStringStringValue(data);\n            case CODE_LONG_INT_INT_BYTE_BYTE_STRING -> decodeLongIntIntByteByteStringValue(data);\n            case CODE_INT_BOOLEAN_INT_BOOLEAN -> decodeIntBooleanIntBooleanValue(data);\n            case CODE_BYTES_STRING_STRING -> decodeBytesStringStringValue(data);\n            default -> throw new IllegalArgumentException(\"unsupported DataType:\" + dataType);\n        };\n    }\n\n    /**\n     * @deprecated Since 4.0.0. Use {@link #getEncoder(Object)}, which resolves\n     * the type code and the encoding logic with a single type dispatch.\n     */\n    @Deprecated\n    public byte getTypeCode(Object o) {\n        if (o == null) {\n            return CODE_NULL;\n        }\n        if (o instanceof Number) {\n            if (o instanceof Long) {\n                return CODE_LONG;\n            } else if (o instanceof Integer) {\n                return CODE_INT;\n            } else if (o instanceof Short) {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/commons-server/src/main/java/com/navercorp/pinpoint/common/server/bo/AnnotationTranscoder.java#L82-L118","documentation":"AnnotationTranscoder.decode() switches over the known DataType type codes when deserializing an annotation value from bytes; if the code read from the buffer is not one of the decodable codes, it throws IllegalArgumentException. This typically means the byte payload was written with a type code this transcoder version does not know.","triggerScenarios":"Calling decode(dataType, byte[] data) with a DataType that has no decode case — e.g. a type code outside CODE_INT_STRING..CODE_BYTES_STRING_STRING, or a newer code written by a newer collector being read by an older server.","commonSituations":"Version skew between agent/collector that serialized annotations and the server decoding them; corrupt serialized annotation blobs; passing an arbitrary DataType into a deprecated decode API.","solutions":["Upgrade pinpoint commons-server so the transcoder recognizes the type code that was serialized","Log/inspect dataType.getCode() on failure and add a decode case if it is a new supported type","Verify the byte array passed in is the full, uncorrupted serialized value (not truncated, wrong offset)","Prefer getEncoder(Object)/current APIs over the deprecated transcode path, which has fewer supported codes"],"exampleFix":"// before\nObject value = transcoder.decode(dataType, bytes); // throws for unknown code\n// after\nif (transcoder.isSupported(dataType)) {\n    Object value = transcoder.decode(dataType, bytes);\n} else {\n    log.warn(\"unsupported annotation type {}\", dataType);\n}","handlingStrategy":"try-catch","validationCode":"if (!isKnownDataType(dataType)) { log.warn(\"unsupported DataType {}\", dataType); return null; }","typeGuard":null,"tryCatchPattern":"try { return transcoder.decode(dataType, bytes); } catch (IllegalArgumentException e) { log.warn(\"decode failed: {}\", e.getMessage()); return null; }","preventionTips":["Keep collector and server versions aligned","Check the DataType code against supported codes before decoding","Migrate to getEncoder(Object)/current decode APIs"],"tags":["java","serialization","deserialization","version-skew"],"backgroundTag":"unsupported-enum-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"}