{"record":{"id":"aa455c27d1a16360","repo":"provectus/kafka-ui","slug":"classname-property-not-set-for-custom-serde-se","errorCode":null,"errorMessage":"'className' property not set for custom serde ${serdeConfig.getName()}","messagePattern":"'className' property not set for custom serde (.+?)","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"kafka-ui-api/src/main/java/com/provectus/kafka/ui/serdes/SerdesInitializer.java","lineNumber":259,"sourceCode":"        serdeConfig.getName(),\n        serde,\n        nullablePattern(serdeConfig.getTopicKeysPattern()),\n        nullablePattern(serdeConfig.getTopicValuesPattern()),\n        null\n    );\n  }\n\n  @SneakyThrows\n  private <T extends Serde> T createSerdeInstance(Class<T> clazz) {\n    return clazz.getDeclaredConstructor().newInstance();\n  }\n\n  private SerdeInstance loadAndInitCustomSerde(SerdeConfig serdeConfig,\n                                               PropertyResolver serdeProps,\n                                               PropertyResolver clusterProps,\n                                               PropertyResolver globalProps) {\n    if (Strings.isNullOrEmpty(serdeConfig.getClassName())) {\n      throw new ValidationException(\n          \"'className' property not set for custom serde \" + serdeConfig.getName());\n    }\n    if (Strings.isNullOrEmpty(serdeConfig.getFilePath())) {\n      throw new ValidationException(\n          \"'filePath' property not set for custom serde \" + serdeConfig.getName());\n    }\n    var loaded = customSerdeLoader.loadAndConfigure(\n        serdeConfig.getClassName(), serdeConfig.getFilePath(), serdeProps, clusterProps, globalProps);\n    return new SerdeInstance(\n        serdeConfig.getName(),\n        loaded.getSerde(),\n        nullablePattern(serdeConfig.getTopicKeysPattern()),\n        nullablePattern(serdeConfig.getTopicValuesPattern()),\n        loaded.getClassLoader()\n    );\n  }\n\n  @Nullable","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/provectus/kafka-ui/blob/83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7/kafka-ui-api/src/main/java/com/provectus/kafka/ui/serdes/SerdesInitializer.java#L241-L277","documentation":"Custom serdes are loaded from an external archive by class name. loadAndInitCustomSerde requires both className and filePath; when className is missing or empty it throws ValidationException indicating the custom serde cannot be resolved without it.","triggerScenarios":"A serde entry with a non-built-in name and a filePath but no className (empty/null) reaches loadAndInitCustomSerde.","commonSituations":"Deleting className from a copied serde template; YAML key typo (class-name vs className) so className reads as null; entry intended to be built-in but name doesn't match any built-in serde.","solutions":["Add the fully-qualified className of the serde implementation to the entry","Fix YAML key spelling/casing so className is actually parsed","If you meant a built-in serde, use its exact built-in name instead"],"exampleFix":"// before\nserde:\n  - name: my-serde\n    filePath: /opt/serdes/my-serde.jar\n// after\nserde:\n  - name: my-serde\n    className: com.example.MySerde\n    filePath: /opt/serdes/my-serde.jar","handlingStrategy":"validation","validationCode":"if (!isBuiltInSerdeName(cfg.getName()) && Strings.isNullOrEmpty(cfg.getClassName()))\n  throw new IllegalArgumentException(\"custom serde \" + cfg.getName() + \" missing className\");","typeGuard":null,"tryCatchPattern":"try {\n  serde = createSerdeFromConfig(cfg, ...);\n} catch (ValidationException e) {\n  log.error(\"Custom serde {}: {}\", cfg.getName(), e.getMessage());\n  throw e;\n}","preventionTips":["Always include fully-qualified className for custom serdes","Check YAML key spelling (className, not class-name)","Confirm the name is not a built-in serde name; otherwise drop className/filePath"],"tags":["serde","config","validation","custom"],"backgroundTag":"missing-required-config-field","analyzedSha":"83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7","analyzedAt":"2026-09-08T04:35:39.002Z","contentChangedAt":"2026-09-08T04:35:39.002Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}