apache/dolphinscheduler · error · ServiceException

10001

10001

Error message

request parameter {0} is not valid

What it means

A catch-all ServiceException thrown from generateTaskDefinitionList when an unexpected (non-ServiceException) exception occurs while parsing or validating the task definition JSON. It maps to the generic REQUEST_PARAMS_NOT_VALID_ERROR status, masking the underlying exception details from the client.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java:387

                    log.error(
                            "Generate task definition list failed, the given task definition name is duplicate, taskName: {}, taskDefinition: {}",
                            taskDefinitionLog.getName(), taskDefinitionLog);
                    throw new ServiceException(Status.TASK_NAME_DUPLICATE_ERROR, taskDefinitionLog.getName());
                }

                if (!checkTaskParameters(taskDefinitionLog.getTaskType(), taskDefinitionLog.getTaskParams())) {
                    log.error(
                            "Generate task definition list failed, the given task definition parameter is invalided, taskName: {}, taskDefinition: {}",
                            taskDefinitionLog.getName(), taskDefinitionLog);
                    throw new ServiceException(Status.WORKFLOW_NODE_S_PARAMETER_INVALID, taskDefinitionLog.getName());
                }
            }
            return taskDefinitionLogs;
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception e) {
            log.error("Generate task definition list failed, meet an unknown exception", e);
            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR);
        }
    }

    private List<WorkflowTaskRelationLog> generateTaskRelationList(String taskRelationJson,
                                                                   List<TaskDefinitionLog> taskDefinitionLogs) {
        try {
            List<WorkflowTaskRelationLog> taskRelationList =
                    JSONUtils.toList(taskRelationJson, WorkflowTaskRelationLog.class);
            if (CollectionUtils.isEmpty(taskRelationList)) {
                log.error("Generate task relation list failed the taskRelation list is empty, taskRelationJson: {}",
                        taskRelationJson);
                throw new ServiceException(Status.DATA_IS_NOT_VALID);
            }
            List<WorkflowTaskRelation> workflowTaskRelations = taskRelationList.stream()
                    .map(workflowTaskRelationLog -> JSONUtils.parseObject(
                            JSONUtils.toJsonString(workflowTaskRelationLog),
                            WorkflowTaskRelation.class))
                    .collect(Collectors.toList());

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Check the server log for 'Generate task definition list failed, meet an unknown exception' to see the real stack trace
  2. Validate each entry in taskDefinitionJson has name, taskType, taskParams and taskCode set before calling
  3. Rebuild the request payload using the UI export rather than manual JSON construction
  4. Upgrade to a newer patch version if the stack trace points at a JSONUtils parsing bug

Example fix

// before
params.put("taskDefinitionJson", rawStringFromUser)
// after
String json = validateTaskDefinitionJson(rawStringFromUser); // parse + required-field check first
params.put("taskDefinitionJson", json)
Defensive patterns

Strategy: validation

Validate before calling

// pre-validate payload structure and required fields
List<TaskDefinitionLog> defs = JSONUtils.toList(json, TaskDefinitionLog.class);
if (defs == null || defs.stream().anyMatch(d -> d.getName()==null || d.getTaskType()==null || d.getTaskParams()==null)) throw new IllegalArgumentException("malformed task definition");

Try / catch

try { ... } catch (ServiceException e) { if (e.getCode() == 10001) { checkServerLogsForRootCause(); } }

Prevention

When it happens

Trigger: Any runtime exception inside generateTaskDefinitionList not already covered by earlier checks — e.g. a TaskDefinitionLog entry with unexpected internal nulls causing NPE during iteration, or deserialization edge cases.

Common situations: JSON entries missing fields the code assumes non-null; upstream library changes altering parse behavior; corrupt payload from intermediate proxies.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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