{"record":{"id":"409d3f65aa1551b1","repo":"apache/dolphinscheduler","slug":"seatunnel-task-params-is-not-valid","errorCode":null,"errorMessage":"SeaTunnel task params is not valid","messagePattern":"SeaTunnel task params is not valid","errorType":"validation","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java","lineNumber":80,"sourceCode":"\n    private final ShellCommandExecutor shellCommandExecutor;\n\n    public SeatunnelTask(TaskExecutionContext taskExecutionContext) {\n        super(taskExecutionContext);\n\n        this.shellCommandExecutor = new ShellCommandExecutor(taskExecutionContext);\n    }\n\n    @Override\n    public List<String> getApplicationIds() throws TaskException {\n        return Collections.emptyList();\n    }\n\n    @Override\n    public void init() {\n        log.info(\"Intialize SeaTunnel task params {}\", JSONUtils.toPrettyJsonString(seatunnelParameters));\n        if (seatunnelParameters == null || !seatunnelParameters.checkParameters()) {\n            throw new TaskException(\"SeaTunnel task params is not valid\");\n        }\n    }\n\n    // todo split handle to submit and track\n    @Override\n    public void handle(TaskCallBack taskCallBack) throws TaskException {\n        try {\n            // construct process\n            String command = buildCommand();\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .appendScript(command);\n\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n            setExitStatusCode(commandExecuteResult.getExitStatusCode());\n            setAppIds(String.join(TaskConstants.COMMA, getApplicationIds()));\n            setProcessId(commandExecuteResult.getProcessId());\n            seatunnelParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());\n        } catch (InterruptedException e) {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java#L62-L98","documentation":"SeatunnelTask.init() throws TaskException(\"SeaTunnel task params is not valid\") when seatunnelParameters is null or checkParameters() fails. checkParameters verifies the startup script and other required SeaTunnel settings, so this means the task definition is incomplete or malformed.","triggerScenarios":"SeatunnelParameters is null (taskParams JSON didn't deserialize) or checkParameters() returns false — e.g. startup script empty/not one of the supported ones, or no raw script/deployment mode provided depending on the variant.","commonSituations":"Task form saved with missing startup script, upgrading DolphinScheduler so stored SeaTunnel params lack newly required fields, or copying a task definition between clusters where the plugin expects extra fields.","solutions":["Open the SeaTunnel task in the UI and ensure the startup script (seatunnel.sh/flink/run) and script content are set, then save.","Call checkParameters() on your params offline / read its source to see exactly which field is missing.","Re-create the task definition in the current DS version so new required fields get defaults.","Verify the taskParams JSON stored in the DB deserializes into SeatunnelParameters without nulling fields."],"exampleFix":"// before: startup script missing\n{\"startupScript\":null,\"rawScript\":\"env { ... }\"}\n// after\n{\"startupScript\":\"seatunnel.sh\",\"rawScript\":\"env { ... }\"}","handlingStrategy":"validation","validationCode":"SeatunnelParameters sp = JSONUtils.parseObject(taskParams, SeatunnelParameters.class);\nif (sp == null || !sp.checkParameters()) {\n    throw new IllegalStateException(\"SeaTunnel params invalid: check startupScript and rawScript\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    task.init();\n} catch (TaskException e) {\n    log.error(\"SeaTunnel task definition incomplete — re-edit task in UI\", e);\n}","preventionTips":["Set startupScript and script content in the task form before saving","Re-save task definitions after DolphinScheduler upgrades so new required fields get defaults","Never edit taskParams JSON directly in the database"],"tags":["seatunnel","task-params","validation"],"backgroundTag":"invalid-config-value","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"}