apache/dolphinscheduler · error · TaskException

datafactory runId is null, not created yet

Error message

datafactory runId is null, not created yet

What it means

A state guard in checkApplicationId: hook.getRunId() returned null/empty because the Data Factory pipeline run has not been created yet (submitApplication not completed or failed before a runId was captured), so tracking or cancelling has no run to act on. The faulty state is the missing runId in the DatafactoryHook after task submission.

Solutions

  1. Ensure submitApplication succeeded before trackApplicationStatus/cancelApplication are invoked
  2. Check the submit-phase logs for why the pipeline run id was never stored
  3. Re-submit the task so a new run id is obtained
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datafactory/src/main/java/org/apache/dolphinscheduler/plugin/task/datafactory/DatafactoryTask.java:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datafactory/src/main/java/org/apache/dolphinscheduler/plugin/task/datafactory/DatafactoryTask.java:101

    public void trackApplicationStatus() throws TaskException {
        checkApplicationId();
        Boolean isFinishedSuccessfully;
        isFinishedSuccessfully = hook.queryStatus(parameters);
        if (!isFinishedSuccessfully) {
            exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;
        } else {
            exitStatusCode = TaskConstants.EXIT_CODE_SUCCESS;
        }
    }

    /**
     * check datafactory applicationId or get it from appId
     */
    private void checkApplicationId() {
        String taskExecArn = hook.getRunId();
        if (StringUtils.isEmpty(taskExecArn)) {
            if (StringUtils.isEmpty(getAppIds())) {
                throw new TaskException("datafactory runId is null, not created yet");
            }
            hook.setRunId(getAppIds());
        }
    }

    public int startDatafactoryTask() {
        Boolean isStartSuccessfully = hook.startDatafactoryTask(parameters);
        if (!isStartSuccessfully) {
            return TaskConstants.EXIT_CODE_FAILURE;
        }
        return TaskConstants.EXIT_CODE_SUCCESS;
    }

    @Override
    public DatafactoryParameters getParameters() {
        return parameters;
    }

View on GitHub (pinned to 02eac45a1b)