xuxueli/xxl-job · critical · RuntimeException

xxl-job executor appname empty.

Error message

xxl-job executor appname empty.

What it means

Thrown by XxlJobExecutor.start() when the appname field is blank. appname identifies the executor group the admin uses to route jobs; a blank value aborts startup.

Source

Thrown at xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java:141

    }

    /**
     * start
     */
    public void start() throws Exception {

        // valid enabled
        if (!enabled) {
            logger.info(">>>>>>>>>>> xxl-job executor start fail, enabled:{}", enabled);
            return;
        }

        // valid param
        if (StringTool.isBlank(adminAddresses)) {
            throw new RuntimeException("xxl-job executor adminAddresses empty.");
        }
        if (StringTool.isBlank(appname)) {
            throw new RuntimeException("xxl-job executor appname empty.");
        }
        if (StringTool.isBlank(accessToken)) {
            throw new RuntimeException("xxl-job executor accessToken empty.");
        }

        // bind instance
        xxlJobExecutor = this;

        // init logpath
        XxlJobFileAppender.initLogPath(logPath);

        // init invoker, admin-client
        initAdminBizList();

        // 1、init JobLogFileCleanThread
        jobLogFileCleanThreadHelper = new JobLogFileCleanThreadHelper();
        jobLogFileCleanThreadHelper.start(logRetentionDays);

View on GitHub (pinned to e74c784f68)

Solutions

  1. Set xxl.job.executor.appname (or setAppname) to a non-blank unique executor name (e.g. "my-app-executor").
  2. Ensure the appname matches a registered executor group in the admin console.
  3. Check the active Spring profile actually contains the property.

Example fix

// before
xxlJobExecutor.setAppname("");
// after
xxlJobExecutor.setAppname("my-app-executor");
Defensive patterns

Strategy: validation

Validate before calling

String appname = config.getAppname();
if (StringTool.isBlank(appname)) {
    throw new IllegalStateException("xxl.job.executor.appname is required");
}

Try / catch

try {
    xxlJobExecutor.start();
} catch (RuntimeException e) {
    log.error("executor start failed: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling start() with appname unset or whitespace (e.g. xxl.job.executor.appname missing from configuration).

Common situations: Missing xxl.job.executor.appname in application.properties; wrong property key; env var not propagated into the container; template config left unfilled.

Related errors


AI-assisted analysis of xuxueli/xxl-job@e74c784f68 (2026-08-14). Data as JSON: /api/errors/5bdbf2dc4b185bbe. Report an issue: GitHub.