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
- Verify executor groups exist: SELECT id, app_name, title FROM xxl_job_group.
- Grant the user access to at least one executor group via the XXL-Job admin permission management.
- Check the JobGroupPermissionUtil filter logic — ensure the user's role/request headers correctly map to authorized groups.
- 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
- Grant executor group permissions to users who need to view job logs.
- Ensure at least one executor group is registered and accessible to the user's role.
- Check the permission-to-group mapping for new user accounts.
- Create executor groups during initial XXL-Job setup.
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
- jobgroup_empty
- jobinfo_field_id
- joblog_logid_invalid
- jobinfo_glue_jobid_invalid
- jobinfo_glue_gluetype_invalid
AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14).
Data as JSON: /api/errors/87592d6dff1a7934.
Report an issue: GitHub.