{"record":{"id":"c710687678959df1","repo":"apache/dolphinscheduler","slug":"datax-task-params-is-not-valid","errorCode":null,"errorMessage":"datax task params is not valid","messagePattern":"datax task params is not valid","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java","lineNumber":124,"sourceCode":"\n    private DataxTaskExecutionContext dataxTaskExecutionContext;\n\n    public DataxTask(TaskExecutionContext taskExecutionContext) {\n        super(taskExecutionContext);\n\n        this.shellCommandExecutor = new ShellCommandExecutor(taskExecutionContext);\n    }\n\n    /**\n     * init DataX config\n     */\n    @Override\n    public void init() {\n        dataXParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), DataxParameters.class);\n        log.info(\"Initialize datax task params {}\", JSONUtils.toPrettyJsonString(dataXParameters));\n\n        if (dataXParameters == null || !dataXParameters.checkParameters()) {\n            throw new RuntimeException(\"datax task params is not valid\");\n        }\n        SensitiveDataConverter.addMaskPattern(POST_JDBC_INFO_REGEX);\n        dataxTaskExecutionContext =\n                dataXParameters.generateExtendedContext(taskRequest.getResourceParametersHelper());\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    @Override\n    public void handle(TaskCallBack taskCallBack) throws TaskException {\n        try {\n            // replace placeholder,and combine local and global parameters\n            Map<String, Property> paramsMap = taskRequest.getPrepareParamsMap();\n\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .properties(ParameterUtils.convert(paramsMap))\n                    .appendScript(buildCommand(buildDataxJsonFile(paramsMap), paramsMap));\n\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java#L106-L142","documentation":"A parameter validation guard in DataxTask.init: JSONUtils.parseObject returned null (unparseable taskParams JSON) or dataXParameters.checkParameters() found required fields missing — for custom JSON mode the json/datasource fields, for template mode the reader/writer selection. The offending input is the taskParams JSON in the task definition; the task fails before any command is built.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the task definition and complete the required DataX fields (datasource, json, or custom template parameters)","Ensure the taskParams JSON deserializes into DataxParameters (no typos in field names, correct types)","Use testHandleParamsMap-style validation in the UI to catch missing fields before saving"],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}