{"record":{"id":"d01f61de36a03c21","repo":"alibaba/DataX","slug":"s-json-map-s","errorCode":null,"errorMessage":"您提供的配置文件有误. 路径[%s]需要配置Json格式的Map对象，但该节点发现实际类型是[%s]. 请检查您的配置并作出修改.","messagePattern":"您提供的配置文件有误\\. 路径\\[(.+?)\\]需要配置Json格式的Map对象，但该节点发现实际类型是\\[(.+?)\\]\\. 请检查您的配置并作出修改\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"common/src/main/java/com/alibaba/datax/common/util/Configuration.java","lineNumber":974,"sourceCode":"\n\t\tfor (final String each : split2List(path)) {\n\t\t\tif (isPathMap(each)) {\n\t\t\t\ttarget = findObjectInMap(target, each);\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttarget = findObjectInList(target, each);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn target;\n\t}\n\n\t@SuppressWarnings(\"unchecked\")\n\tprivate Object findObjectInMap(final Object target, final String index) {\n\t\tboolean isMap = (target instanceof Map);\n\t\tif (!isMap) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"您提供的配置文件有误. 路径[%s]需要配置Json格式的Map对象，但该节点发现实际类型是[%s]. 请检查您的配置并作出修改.\",\n\t\t\t\t\tindex, target.getClass().toString()));\n\t\t}\n\n\t\tObject result = ((Map<String, Object>) target).get(index);\n\t\tif (null == result) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"您提供的配置文件有误. 路径[%s]值为null，datax无法识别该配置. 请检查您的配置并作出修改.\", index));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t@SuppressWarnings({ \"unchecked\" })\n\tprivate Object findObjectInList(final Object target, final String each) {\n\t\tboolean isList = (target instanceof List);\n\t\tif (!isList) {\n\t\t\tthrow new IllegalArgumentException(String.format(","sourceCodeStart":956,"sourceCodeEnd":992,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/common/src/main/java/com/alibaba/datax/common/util/Configuration.java#L956-L992","documentation":"Thrown by Configuration.findObjectInMap while resolving a dotted configuration path: an intermediate node expected to be a JSON object (Map) turned out to be another type (List, String, number...). DataX's Configuration.get(path) walks the path segment by segment; if you index into a scalar or array with a key, this error fires and names both the path segment and the actual runtime class.","triggerScenarios":"Calling configuration.get/set with a path like \"job.content.reader\" where \"content\" resolves to a String or the path crosses a list without [n] indexing; e.g. get(\"a.b\") when \"a\" is \"text\".","commonSituations":"Job json structure mistake: nesting a map under a key that actually holds a scalar or array (e.g. \"content\": \"...\" instead of an object); plugin code reading a wrong key path after a config schema change; mixing [index] and .key navigation incorrectly.","solutions":["Inspect the job json at the reported path segment and make that node a JSON object {..}","Use [n] indexing (e.g. \"job.content[0].reader\") where the node is an array","Verify the exact configuration key path expected by the plugin/version in use"],"exampleFix":"// before\n{\"job\": {\"content\": \"myfile\"}} \nconf.get(\"job.content.reader\"); // throws\n// after\n{\"job\": {\"content\": [{\"reader\": {...}}]}}\nconf.get(\"job.content[0].reader\");","handlingStrategy":"type-guard","validationCode":"// validate path shape against parsed json before deep get\nObject node = conf.get(\"job.content\");\nif (!(node instanceof List)) throw new IllegalStateException(\"job.content must be an array\");","typeGuard":"boolean isJsonObject(Object o) { return o instanceof Map; }","tryCatchPattern":"catch (IllegalArgumentException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"需要配置Json格式的Map对象\")) {\n    // print the path + actual type, fix the json structure\n  }\n  throw e;\n}","preventionTips":["Validate job json with a schema or example before running DataX","Use [n] for array nodes and .key for object nodes in paths","Unit-test config paths against sample job files"],"tags":["datax","configuration","json","path-resolution"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}