{"record":{"id":"9927e5fb4ff2b33e","repo":"provectus/kafka-ui","slug":"input-csv-is-not-valid-blank-value-in-colum","errorCode":null,"errorMessage":"Input csv is not valid - blank value in colum ","messagePattern":"Input csv is not valid - blank value in colum ","errorType":"validation","errorClass":"ValidationException","httpStatus":400,"severity":"error","filePath":"kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/acl/AclCsv.java","lineNumber":50,"sourceCode":"        \"%s,%s,%s,%s,%s,%s,%s\",\n        filter.principal(),\n        pattern.resourceType(),\n        pattern.patternType(),\n        pattern.name(),\n        filter.operation(),\n        filter.permissionType(),\n        filter.host()\n    );\n  }\n\n  private static AclBinding parseCsvLine(String csv, int line) {\n    String[] values = csv.split(VALUES_SEPARATOR);\n    if (values.length != 7) {\n      throw new ValidationException(\"Input csv is not valid - there should be 7 columns in line \" + line);\n    }\n    for (int i = 0; i < values.length; i++) {\n      if ((values[i] = values[i].trim()).isBlank()) {\n        throw new ValidationException(\"Input csv is not valid - blank value in colum \" + i + \", line \" + line);\n      }\n    }\n    try {\n      return new AclBinding(\n          new ResourcePattern(\n              ResourceType.valueOf(values[1]), values[3], PatternType.valueOf(values[2])),\n          new AccessControlEntry(\n              values[0], values[6], AclOperation.valueOf(values[4]), AclPermissionType.valueOf(values[5]))\n      );\n    } catch (IllegalArgumentException enumParseError) {\n      throw new ValidationException(\"Error parsing enum value in line \" + line);\n    }\n  }\n\n  public static Collection<AclBinding> parseCsv(String csvString) {\n    String[] lines = csvString.split(LINE_SEPARATOR);\n    if (lines.length == 0) {\n      throw new ValidationException(\"Error parsing ACL csv file: no lines in file\");","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/provectus/kafka-ui/blob/83b5a60cc08501b570a0c4d0b4cdfceb1b88d6b7/kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/acl/AclCsv.java#L32-L68","documentation":"AclCsv.parseCsvLine trims each of the 7 CSV values and rejects any that are blank, throwing 'Input csv is not valid - blank value in colum <i>, line <n>'. Every ACL field (principal, resource type, pattern, resource name, operation, permission, host) must be non-empty.","triggerScenarios":"An ACL CSV line with an empty field after trimming — e.g. ',,LITERAL,...' or a trailing comma leaving the host column empty.","commonSituations":"Template files with unfilled placeholders; rows exported with optional empty columns; accidental double commas; whitespace-only values.","solutions":["Fill in the blank column (index given in the message) on the reported line","Use '*' for wildcard values where Kafka allows it (e.g. host)","Remove fully empty lines before parsing (blank lines are skipped, but rows with stray commas are not)","Re-export the CSV ensuring no null/empty cells"],"exampleFix":"// before\nUser:alice,TOPIC,LITERAL,my-topic,READ,ALLOW,\n// after\nUser:alice,TOPIC,LITERAL,my-topic,READ,ALLOW,*","handlingStrategy":"validation","validationCode":"// Java (caller)\nString[] vals = line.split(\",\");\nfor (int i = 0; i < vals.length; i++) {\n  if (vals[i].trim().isBlank()) throw new IllegalArgumentException(\"Blank column \" + i + \" on ACL CSV line\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  Collection<AclBinding> bindings = AclCsv.parseCsv(csv);\n} catch (ValidationException e) {\n  if (e.getMessage().contains(\"blank value\")) {\n    log.error(\"Fill blank ACL CSV field: {}\", e.getMessage());\n  } else { throw e; }\n}","preventionTips":["Never leave ACL cells empty; use '*' for wildcard host/principal where applicable","Replace template placeholders before import","Scan for double commas or trailing commas in exported files","Validate all 7 cells are non-blank pre-upload"],"tags":["kafka","acl","csv","validation"],"backgroundTag":"empty-required-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"}