{"record":{"id":"606d4e4b6f29bf04","repo":"apache/dolphinscheduler","slug":"cannot-parse-task-parameters","errorCode":null,"errorMessage":"Cannot parse task parameters: ","messagePattern":"Cannot parse task parameters: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskPluginManager.java","lineNumber":98,"sourceCode":"    public static boolean checkTaskParameters(String taskType, String taskParams) {\n        AbstractParameters abstractParameters = parseTaskParameters(taskType, taskParams);\n        return abstractParameters.checkParameters();\n    }\n\n    /**\n     * Parse the task parameters\n     * @param taskType task type, cannot be null\n     * @param taskParams task parameters\n     * @return AbstractParameters\n     * @throws IllegalArgumentException if the TaskChannel is not found\n     * @throws IllegalArgumentException if cannot deserialize the task parameters\n     */\n    public static AbstractParameters parseTaskParameters(String taskType, String taskParams) {\n        checkNotNull(taskType, \"taskType cannot be null\");\n        TaskChannel taskChannel = getTaskChannel(taskType);\n        AbstractParameters abstractParameters = taskChannel.parseParameters(taskParams);\n        if (abstractParameters == null) {\n            throw new IllegalArgumentException(\"Cannot parse task parameters: \" + taskParams + \" for : \" + taskType);\n        }\n        return abstractParameters;\n    }\n\n}\n","sourceCodeStart":80,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskPluginManager.java#L80-L104","documentation":"TaskPluginManager.parseTaskParameters throws IllegalArgumentException when taskChannel.parseParameters(taskParams) returns null for the given type. The task plugin could not deserialize the JSON parameter string into its parameter object.","triggerScenarios":"parseParameters returns null — taskParams JSON does not match the plugin's expected parameter class (wrong/missing fields, non-JSON string, empty params), or getTaskChannel resolved a plugin whose parser rejects the payload.","commonSituations":"Task params edited by hand with invalid JSON; workflow definitions migrated across versions where the parameter schema changed; passing a params string of one task type to another type's channel.","solutions":["Validate taskParams is well-formed JSON matching the plugin's parameter schema","Print/inspect the full message: it includes both params and the task type","Re-save the task definition in the UI to regenerate canonical params","Check for version migration issues between the workflow definition and the installed plugin","Ensure the correct taskType is passed so the right channel parses the params"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before parsing\nObjectNode params = new ObjectMapper().readTree(taskParams);\nif (params == null || !params.isObject() || params.size() == 0) {\n    throw new IllegalArgumentException(\"Invalid task params JSON: \" + taskParams);\n}\nAbstractParameters p = TaskPluginManager.parseTaskParameters(taskType, taskParams);","typeGuard":null,"tryCatchPattern":"try {\n    AbstractParameters params = TaskPluginManager.parseTaskParameters(taskType, taskParams);\n} catch (IllegalArgumentException e) {\n    log.error(\"Param parse failed: {}\", e.getMessage());\n    // message includes both params and type — compare against plugin schema\n}","preventionTips":["Validate taskParams JSON against the plugin's parameter schema before submit","Regenerate task definitions via the UI after upgrades (schema drift)","Never hand-edit taskParams without validating JSON","Ensure taskType matches the params structure being passed"],"tags":["json","task-parameters","parsing"],"backgroundTag":"json-unmarshal-failed","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"}