{"record":{"id":"35941738faa4f921","repo":"apache/dolphinscheduler","slug":"convert-json-to-task-params-failed","errorCode":null,"errorMessage":"Convert json to task params failed","messagePattern":"Convert json to task params failed","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java","lineNumber":89,"sourceCode":"    @Override\n    public void init() {\n\n        parameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), DatasyncParameters.class);\n        log.info(\"Initialize Datasync task params {}\", JSONUtils.toPrettyJsonString(parameters));\n        initParams();\n\n        hook = new DatasyncHook();\n    }\n\n    /**\n     * init datasync hook\n     */\n    public void initParams() throws TaskException {\n        if (parameters.isJsonFormat() && StringUtils.isNotEmpty(parameters.getJson())) {\n            try {\n                parameters = objectMapper.readValue(parameters.getJson(), DatasyncParameters.class);\n            } catch (JsonProcessingException e) {\n                throw new TaskException(\"Convert json to task params failed\", e);\n            }\n            log.info(\"Success convert json to task params {}\", JSONUtils.toPrettyJsonString(parameters));\n        }\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n        try {\n            int exitStatusCode = checkCreateTask();\n            if (exitStatusCode == TaskConstants.EXIT_CODE_FAILURE) {\n                // if create task failure go end\n                setExitStatusCode(exitStatusCode);\n                return;\n            }\n            // start task\n            exitStatusCode = startDatasyncTask();\n            setExitStatusCode(exitStatusCode);\n        } catch (Exception e) {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java#L71-L107","documentation":"In initParams, when the task is in JSON format, objectMapper.readValue failed to convert the user-supplied JSON string into DatasyncParameters — the JSON is syntactically invalid or its fields do not match the DatasyncParameters schema. The offending input is parameters.getJson(); parsing happens before any AWS call, so nothing has been submitted.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the JSON in the task definition UI against the DatasyncParameters schema","Check the Datasync task documentation for the expected JSON structure (e.g. required syncConfig fields)","Ensure parameter placeholder substitution did not corrupt the JSON string"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}