{"record":{"id":"46c986a80021069e","repo":"apache/pulsar","slug":"failed-to-parse-config-file-s-s-on-line-d-col","errorCode":null,"errorMessage":"Failed to parse config file %s. %s on line: %d column: %d","messagePattern":"Failed to parse config file (.+?)\\. (.+?) on line: (.+?) column: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CmdUtils.java","lineNumber":52,"sourceCode":"\n                String exceptionMessage = String.format(\"Failed to parse config file %s. \"\n                                + \"Invalid field '%s' on line: %d column: %d. Valid fields are %s\",\n                        file,\n                        unrecognizedPropertyException.getPath().get(0).getFieldName(),\n                        unrecognizedPropertyException.getLocation().getLineNr(),\n                        unrecognizedPropertyException.getLocation().getColumnNr(),\n                        unrecognizedPropertyException.getKnownPropertyIds());\n                throw new IllegalArgumentException(exceptionMessage);\n            } else if (ex instanceof InvalidFormatException) {\n\n                InvalidFormatException invalidFormatException = (InvalidFormatException) ex;\n                String exceptionMessage = String.format(\"Failed to parse config file %s. %s on line: %d column: %d\",\n                        file,\n                        invalidFormatException.getOriginalMessage(),\n                        invalidFormatException.getLocation().getLineNr(),\n                        invalidFormatException.getLocation().getColumnNr());\n\n                throw new IllegalArgumentException(exceptionMessage);\n            } else {\n                throw new IllegalArgumentException(ex.getMessage());\n            }\n        }\n    }\n\n    public static boolean positiveCheck(String paramName, long value) {\n        if (value <= 0) {\n            throw new IllegalArgumentException(paramName + \" cannot be less than or equal to 0!\");\n        }\n        return true;\n    }\n\n    public static boolean maxValueCheck(String paramName, long value, long maxValue) {\n        if (value > maxValue) {\n            throw new IllegalArgumentException(paramName + \" cannot be greater than \" + maxValue + \"!\");\n        }\n        return true;","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CmdUtils.java#L34-L70","documentation":"YAML config-parse failure reported by CmdUtils.loadConfig: Jackson threw a general mapping error while reading the client config file (the excerpt covers the non-UnrecognizedProperty, non-InvalidFormat branches), and the file path plus line/column of the offending node are embedded in the rethrown IllegalArgumentException; the config file's malformed section is the faulty input.","triggerScenarios":"Thrown at pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/utils/CmdUtils.java:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the malformed value at the reported line/column","Match the expected type (number vs string, etc.)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}