{"record":{"id":"66306c955149054e","repo":"apache/flink","slug":"unsupported-serializer-type-s-for-s","errorCode":null,"errorMessage":"Unsupported serializer type %s for %s","messagePattern":"Unsupported serializer type (.+?) for (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/api/common/serialization/SerializerConfigImpl.java","lineNumber":421,"sourceCode":"                serializationConfigByClass.entrySet()) {\n            Class<?> type = entry.getKey();\n            Map<String, String> config = entry.getValue();\n            String configType = config.get(\"type\");\n            if (configType == null) {\n                throw new IllegalArgumentException(\"Serializer type not specified for \" + type);\n            }\n            switch (configType) {\n                case \"pojo\":\n                    registerPojoType(type);\n                    break;\n                case \"kryo\":\n                    parseAndRegisterKryoType(classLoader, type, config);\n                    break;\n                case \"typeinfo\":\n                    parseAndRegisterTypeFactory(classLoader, type, config);\n                    break;\n                default:\n                    throw new IllegalArgumentException(\n                            String.format(\n                                    \"Unsupported serializer type %s for %s\", configType, type));\n            }\n        }\n    }\n\n    private void parseAndRegisterKryoType(\n            ClassLoader classLoader, Class<?> t, Map<String, String> m) {\n        String kryoType = m.get(\"kryo-type\");\n        if (kryoType == null) {\n            registerKryoType(t);\n        } else {\n            switch (kryoType) {\n                case \"default\":\n                    addDefaultKryoSerializer(\n                            t,\n                            loadClass(\n                                    m.get(\"class\"),","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/api/common/serialization/SerializerConfigImpl.java#L403-L439","documentation":"Thrown by the default case of the switch statement in parseSerializationConfig when the 'type' key of a serialization-config entry is not one of the three supported values: pojo, kryo, or typeinfo. This is a validation failure on the config string value; the message reports the unsupported type and the affected class.","triggerScenarios":"Setting pipeline.serialization-config with a type value like 'json', 'avro', or a typo like 'pjo'. The switch has no case for it, so the default branch throws.","commonSituations":"Typo in the type field (e.g. 'Pojo' with capital P, or 'kryoo'); using a serializer type name from an older/newer Flink version; guessing the type value without consulting docs.","solutions":["Set the 'type' key to exactly one of: pojo, kryo, or typeinfo (case-sensitive, lowercase).","Double-check the spelling against the Flink serialization-config documentation.","Remove the entry if you are unsure which type to use; let Flink use its default serializer selection."],"exampleFix":"# before (typo)\npipeline.serialization-config: \"class:com.example.MyType{type:Pojo}\"\n\n# after\npipeline.serialization-config: \"class:com.example.MyType{type:pojo}\"","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"pojo\", \"kryo\", \"typeinfo\");\nfor (Map.Entry<String, Map<String, String>> e : entries.entrySet()) {\n    String type = e.getValue().get(\"type\");\n    if (!valid.contains(type)) {\n        throw new IllegalArgumentException(\n            \"Invalid type '\" + type + \"' for \" + e.getKey() + \"; must be one of \" + valid);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only lowercase pojo, kryo, or typeinfo as the type value.","Add a CI validation step that checks serialization-config type values."],"tags":["serialization","configuration","parsing","validation"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}