apache/dolphinscheduler · error · ServiceException

REQUEST_PARAMS_NOT_VALID_ERROR

REQUEST_PARAMS_NOT_VALID_ERROR

Error message

REQUEST_PARAMS_NOT_VALID_ERROR: request parameter {queue} is not valid

What it means

Thrown by QueueServiceImpl.validQueue when the Queue object's queue value (the YARN queue name, keyed by Constants.QUEUE) is empty. validQueue runs on createQueue, verifyQueue and createQueueIfNotExists, so any of those calls with a blank queue field fails with 'request parameter {queue} is not valid'.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java:75

public class QueueServiceImpl extends BaseServiceImpl implements QueueService {

    @Autowired
    private QueueDao queueDao;

    @Autowired
    private UserDao userDao;

    @Autowired
    private TenantDao tenantDao;

    /**
     * Check the queue new object valid or not
     *
     * @param queue The queue object want to create
     */
    private void validQueue(Queue queue) throws ServiceException {
        if (StringUtils.isEmpty(queue.getQueue())) {
            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE);
        } else if (StringUtils.isEmpty(queue.getQueueName())) {
            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE_NAME);
        } else if (checkQueueExist(queue.getQueue())) {
            throw new ServiceException(Status.QUEUE_VALUE_EXIST, queue.getQueue());
        } else if (checkQueueNameExist(queue.getQueueName())) {
            throw new ServiceException(Status.QUEUE_NAME_EXIST, queue.getQueueName());
        }
    }

    /**
     * Check queue update object valid or not
     *
     * @param existsQueue The exists queue object
     * @param updateQueue The queue object want to update
     */
    private void updateQueueValid(Queue existsQueue, Queue updateQueue) throws ServiceException {
        // Check the exists queue and the necessary of update operation, in not exist checker have to use updateQueue to
        // avoid NPE

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Supply a non-empty queue value (the actual YARN queue name) in the request
  2. Validate queue non-blank in the client before calling the API
  3. Fix the payload mapping so the 'queue' field is populated, not just queueName

Example fix

// before
queueService.createQueue(loginUser, "", "myQueueName");
// after
if (StringUtils.isNotBlank(queueValue)) {
    queueService.createQueue(loginUser, queueValue, "myQueueName");
} else {
    putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "queue");
}
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtils.isBlank(queue)) {
    throw new IllegalArgumentException("queue is required");
}
if (StringUtils.isBlank(queueName)) {
    throw new IllegalArgumentException("queueName is required");
}

Type guard

boolean isValidQueue = q != null
        && StringUtils.isNotBlank(q.getQueue())
        && StringUtils.isNotBlank(q.getQueueName());

Try / catch

try {
    queueService.createQueue(loginUser, queue, queueName);
} catch (ServiceException e) {
    if (e.getCode() == Status.REQUEST_PARAMS_NOT_VALID_ERROR) {
        putMsg(result, e.getCode(), "queue");
        return result;
    }
    throw e;
}

Prevention

When it happens

Trigger: createQueue/verifyQueue called with queue==null or empty string; createQueueIfNotExists invoked with a queue object missing the queue field (e.g. deserialized payload without 'queue').

Common situations: Admin UI form submitted with only the display name filled; REST clients sending queueName but omitting queue; tenant creation flow passing an empty queue; migration scripts copying records with null queue.

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/d1a2eb9f6766c34d. Report an issue: GitHub.