jeecgboot/JeecgBoot · error · XxlJobException

jobgroup_empty

jobgroup_empty

Error message

jobgroup_empty

What it means

Identical guard to error 271 but in JobLogController.index (the job log page). JobGroupPermissionUtil.filterJobGroupByPermission returns an empty list, meaning the current user has no authorized executor groups. Without any job group, there are no jobs to show logs for, so the page cannot render. Thrown as XxlJobException with i18n key 'jobgroup_empty'.

Source

Thrown at jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-xxljob/src/main/java/com/xxl/job/admin/business/controller/JobLogController.java:74

	@Resource
	public XxlJobLogMapper xxlJobLogMapper;
    @Autowired
    private XxlJobService xxlJobService;

	@RequestMapping
	public String index(HttpServletRequest request,
						Model model,
						@RequestParam(value = "jobGroup", required = false, defaultValue = "0") Integer jobGroup,
						@RequestParam(value = "jobId", required = false, defaultValue = "0") Integer jobId) {

		// 1、init JobGroupList
		// find all jobGroup
		List<XxlJobGroup> jobGroupListTotal =  xxlJobGroupMapper.findAll();

		// filter JobGroupList
		List<XxlJobGroup> jobGroupList = JobGroupPermissionUtil.filterJobGroupByPermission(request, jobGroupListTotal);
		if (CollectionTool.isEmpty(jobGroupList)) {
			throw new XxlJobException(I18nUtil.getString("jobgroup_empty"));
		}
		List<Integer> jobGroupIds = jobGroupList.stream().map(XxlJobGroup::getId).toList();

		// 2、check jobId
		if (jobId > 0) {
			// valid jobId
			XxlJobInfo jobInfo = xxlJobInfoMapper.loadById(jobId);
			if (jobInfo == null) {
				throw new RuntimeException(I18nUtil.getString("jobinfo_field_id") + I18nUtil.getString("system_invalid"));
			}
			// valid jobGroup
			jobGroup = jobInfo.getJobGroup();
		}

		// 3、init jobGroup, default first 1
		if (!jobGroupIds.contains(jobGroup)) {
			jobGroup = jobGroupList.get(0).getId();
		}

View on GitHub (pinned to 96fb33f5ec)

Solutions

  1. Verify executor groups exist: SELECT id, app_name, title FROM xxl_job_group.
  2. Grant the user access to at least one executor group via the XXL-Job admin permission management.
  3. Check the JobGroupPermissionUtil filter logic — ensure the user's role/request headers correctly map to authorized groups.
  4. If this is a fresh XXL-Job setup, create an executor group (Executor Management → Add) and register the executor.

Example fix

// before: user navigates directly to log page without group access
window.location.href = '/joblog';

// after: verify group access first
const response = await api.get('/jobgroup/pageList');
if (!response.data.data || response.data.data.length === 0) {
  alert('No executor groups assigned. Please contact the administrator.');
  return;
}
window.location.href = '/joblog';
Defensive patterns

Strategy: validation

Validate before calling

// Check if user has any authorized job groups before loading the log page
public boolean hasAuthorizedJobGroups(HttpServletRequest request) {
    List<XxlJobGroup> allGroups = xxlJobGroupMapper.findAll();
    List<XxlJobGroup> filtered = JobGroupPermissionUtil.filterJobGroupByPermission(request, allGroups);
    return !CollectionTool.isEmpty(filtered);
}

Try / catch

try {
    return "business/job.log";
} catch (XxlJobException e) {
    if (e.getMessage().contains("jobgroup_empty")) {
        model.addAttribute("error", "No executor groups assigned. Contact admin to assign permissions.");
        return "business/job.log";
    }
    throw e;
}

Prevention

When it happens

Trigger: User with no job group permissions navigates to the job execution log page. All executor groups were deleted. Permission configuration excludes all groups for this user's role or admin-level access.

Common situations: New operator who needs to view job logs but hasn't been assigned to any executor group. Audit or read-only accounts that were created without group permissions. Post-migration where executor groups were not recreated.

Related errors


AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14). Data as JSON: /api/errors/87592d6dff1a7934. Report an issue: GitHub.