apache/dolphinscheduler · error · ZeppelinTaskException

zeppelin task params is not valid

Error message

zeppelin task params is not valid

What it means

ZeppelinTask.init() parses taskParams into ZeppelinParameters and runs checkParameters(). If parsing yields null or validation fails (e.g. missing noteId/paragraphId), it throws ZeppelinTaskException with this message before any Zeppelin connection is made.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-zeppelin/src/main/java/org/apache/dolphinscheduler/plugin/task/zeppelin/ZeppelinTask.java:79

     * zeppelin api client
     */
    private ZeppelinClient zClient;

    private ZeppelinConnectionParam zeppelinConnectionParam;

    private ZeppelinTaskExecutionContext zeppelinTaskExecutionContext;

    protected ZeppelinTask(TaskExecutionContext taskExecutionContext) {
        super(taskExecutionContext);
        this.taskExecutionContext = taskExecutionContext;
    }

    @Override
    public void init() {
        final String taskParams = taskExecutionContext.getTaskParams();
        this.zeppelinParameters = JSONUtils.parseObject(taskParams, ZeppelinParameters.class);
        if (this.zeppelinParameters == null || !this.zeppelinParameters.checkParameters()) {
            throw new ZeppelinTaskException("zeppelin task params is not valid");
        }
        zeppelinTaskExecutionContext =
                zeppelinParameters.generateExtendedContext(taskExecutionContext.getResourceParametersHelper());
        zeppelinConnectionParam = (ZeppelinConnectionParam) DataSourceUtils
                .buildConnectionParams(DbType.valueOf(zeppelinParameters.getType()),
                        zeppelinTaskExecutionContext.getConnectionParams());
        zeppelinParameters.setUsername(zeppelinConnectionParam.getUsername());
        zeppelinParameters.setPassword(zeppelinConnectionParam.getPassword());
        zeppelinParameters.setRestEndpoint(zeppelinConnectionParam.getRestEndpoint());
        log.info("Initialize zeppelin task params:{}", JSONUtils.toPrettyJsonString(zeppelinParameters));
        this.zClient = getZeppelinClient();
    }

    public boolean login() throws Exception {
        String username = this.zeppelinParameters.getUsername();
        String password = this.zeppelinParameters.getPassword();
        if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {
            this.zClient.login(username, password);

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Open the Zeppelin task node in the UI and fill noteId and paragraphId, then re-save
  2. Validate taskParams JSON parses to a ZeppelinParameters object with all required fields
  3. Compare with a working Zeppelin task's taskParams to spot missing fields

Example fix

// before
{"zeppelinTaskType":"ZEPPELIN","localParams":[]} // no noteId -> invalid
// after
{"zeppelinTaskType":"ZEPPELIN","noteId":"2ABCDEFGH","paragraphId":"paragraph_123","localParams":[]}
Defensive patterns

Strategy: validation

Validate before calling

ZeppelinParameters p = JSONUtils.parseObject(taskParams, ZeppelinParameters.class);
if (p == null || !p.checkParameters()) {
    throw new IllegalStateException("zeppelin task params is not valid");
}

Try / catch

try {
    zeppelinTask.init();
} catch (ZeppelinTaskException e) {
    if (e.getMessage().contains("zeppelin task params is not valid")) {
        // fix noteId/paragraphId and re-save the task
    }
}

Prevention

When it happens

Trigger: taskParams JSON empty/malformed (null parse result) or required Zeppelin parameters (noteId, paragraphId) missing/blank so checkParameters() returns false.

Common situations: Workflow definition with an incompletely filled Zeppelin node; hand-edited JSON missing noteId; version upgrade where ZeppelinParameters fields changed; called also from testBuildCommand in tests with fixture params.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/a328e66ea1f9bc7f. Report an issue: GitHub.