apache/dolphinscheduler · error · ServiceException

10134

10134

Error message

name must be not null

What it means

Status.NAME_NULL (10134) means the worker group name is empty. saveWorkerGroup validates with StringUtils.isEmpty(name) after the permission check and refuses to create or update a worker group without a name.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java:121

     *
     * @param loginUser login user
     * @param id        worker group id
     * @param name      worker group name
     * @param addrList  addr list
     * @return create or update result code
     */
    @Override
    public WorkerGroup saveWorkerGroup(User loginUser,
                                       int id,
                                       String name,
                                       String addrList,
                                       String description) {
        if (!canOperatorPermissions(loginUser, null, AuthorizationType.WORKER_GROUP, WORKER_GROUP_CREATE)) {
            // todo: add permission exception
            throw new ServiceException(Status.USER_NO_OPERATION_PERM);
        }
        if (StringUtils.isEmpty(name)) {
            throw new ServiceException(Status.NAME_NULL);
        }
        checkWorkerGroupAddrList(addrList);
        final Date now = new Date();
        final WorkerGroup workerGroup;
        try {
            if (id == 0) {
                // insert
                workerGroup = new WorkerGroup();
                workerGroup.setCreateTime(now);
                workerGroup.setName(name);
                workerGroup.setAddrList(addrList);
                workerGroup.setUpdateTime(now);
                workerGroup.setDescription(description);
                workerGroupDao.insert(workerGroup);
            } else {
                workerGroup = workerGroupDao.queryById(id);
                if (workerGroup == null) {
                    throw new ServiceException(Status.WORKER_GROUP_NOT_EXIST, id);

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Provide a non-empty, unique name in the request.
  2. Validate the name field client-side before submitting.
  3. For scripts, use "${NAME:?}" style guards so an unset variable fails early.
  4. Trim whitespace — a whitespace-only or empty value is still rejected.

Example fix

// before
curl -d 'name=&addrList=ip:1234' .../worker-groups/save  # 10134
// after
curl -d 'name=prod_group&addrList=ip:1234' .../worker-groups/save
Defensive patterns

Strategy: validation

Validate before calling

if (name == null || name.trim().isEmpty()) {
    throw new IllegalArgumentException("worker group name must be non-empty");
}

Try / catch

try {
    workerGroupService.saveWorkerGroup(loginUser, id, name, addrList, desc);
} catch (ServiceException e) {
    if (e.getCode() == 10134) { /* empty name: prompt user / fix request */ }
}

Prevention

When it happens

Trigger: Submitting the create/update worker-group API with name="" or name=null; a UI form that allows submitting without filling the name field; programmatic calls building the request with a blank variable.

Common situations: Empty string vs missing form parameter confusion in curl calls (name= passes empty); scripts interpolating an unset shell variable into the name field.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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