jeecgboot/JeecgBoot · error · XxlJobException
jobgroup_empty
jobgroup_empty
Error message
jobgroup_empty
What it means
Thrown by JobInfoController.index when the permission-filtered job group list is empty. JobGroupPermissionUtil.filterJobGroupByPermission returns only job groups the current user is authorized to see. If the result is empty, the user has no job group permissions at all, so the job management 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/JobInfoController.java:66
private XxlJobService xxlJobService;
@RequestMapping
public String index(HttpServletRequest request, Model model, @RequestParam(value = "jobGroup", required = false, defaultValue = "-1") int jobGroup) {
// 枚举-字典
model.addAttribute("ExecutorRouteStrategyEnum", ExecutorRouteStrategyEnum.values()); // 路由策略-列表
model.addAttribute("GlueTypeEnum", GlueTypeEnum.values()); // Glue类型-字典
model.addAttribute("ExecutorBlockStrategyEnum", ExecutorBlockStrategyEnum.values()); // 阻塞处理策略-字典
model.addAttribute("ScheduleTypeEnum", ScheduleTypeEnum.values()); // 调度类型
model.addAttribute("MisfireStrategyEnum", MisfireStrategyEnum.values()); // 调度过期策略
// 执行器列表
List<XxlJobGroup> jobGroupListTotal = xxlJobGroupMapper.findAll();
// filter group
List<XxlJobGroup> jobGroupList = JobGroupPermissionUtil.filterJobGroupByPermission(request, jobGroupListTotal);
if (CollectionTool.isEmpty(jobGroupList)) {
throw new XxlJobException(I18nUtil.getString("jobgroup_empty"));
}
// parse jobGroup
if (!(CollectionTool.isNotEmpty(jobGroupList)
&& jobGroupList.stream().map(XxlJobGroup::getId).toList().contains(jobGroup))) {
jobGroup = -1;
}
model.addAttribute("JobGroupList", jobGroupList);
model.addAttribute("jobGroup", jobGroup);
return "business/job.list";
}
@RequestMapping("/pageList")
@ResponseBody
public Response<PageModel<XxlJobInfo>> pageList(HttpServletRequest request,
@RequestParam(required = false, defaultValue = "0") int offset,View on GitHub (pinned to 96fb33f5ec)
Solutions
- Check if any job groups exist: SELECT id, app_name, title FROM xxl_job_group.
- If groups exist, verify the current user has permission — check the job group permission configuration in XXL-Job admin (typically role-to-group mappings or the user's associated executor groups).
- Create at least one executor group in XXL-Job admin → Executor Management → Add, then grant the user access to it.
- If using the permission filter, check JobGroupPermissionUtil's logic — it may filter based on request roles or headers that are misconfigured.
Example fix
// before: no guard on the frontend — user sees a blank page or error
router.push('/jobinfo');
// after: check permissions before navigating
const groups = await fetchJobGroups();
if (!groups || groups.length === 0) {
message.error('No executor groups available. Contact admin to assign permissions.');
return;
}
router.push('/jobinfo'); Defensive patterns
Strategy: validation
Validate before calling
// Check if user has any authorized job groups before loading the 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.list";
} catch (XxlJobException e) {
if (e.getMessage().contains("jobgroup_empty")) {
model.addAttribute("error", "No executor groups assigned. Contact admin.");
return "business/job.list";
}
throw e;
} Prevention
- Grant executor group permissions to users who need to manage jobs.
- Ensure at least one executor group exists and is registered before users access the job management page.
- Check permission configuration in XXL-Job admin for new user accounts.
- Create executor groups proactively during initial setup.
When it happens
Trigger: A user with no assigned job group roles accesses the job management page. All job groups were deleted from xxl_job_group. The permission filter is too restrictive and excludes all groups for this user's role. A new user account was created without being granted executor/group permissions.
Common situations: New admin or operator account that hasn't been granted executor group permissions. Job groups were cleaned up during maintenance and none remain. Permission configuration mismatch between the user's role and the job group permission mappings.
Related errors
- jobgroup_empty
- jobinfo_glue_jobid_invalid
- jobinfo_glue_gluetype_invalid
- jobinfo_field_id
- joblog_logid_invalid
AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14).
Data as JSON: /api/errors/8966fbf1d757df56.
Report an issue: GitHub.