theonedev/onedev · error · ExplicitException
Unable to find group '${groupName}'
Error message
Unable to find group '${groupName}' What it means
During review requirement parsing, a 'group:<name>' criterion whose group cannot be resolved by GroupService.find throws ExplicitException. The requirement references a group that does not exist and therefore cannot be satisfied.
Source
Thrown at server-core/src/main/java/io/onedev/server/util/reviewrequirement/ReviewRequirement.java:80
throw new ExplicitException("User '" + userName + "' is included multiple times");
} else {
throw new ExplicitException("Unable to find user '" + userName + "'");
}
} else if (criteria.groupCriteria() != null) {
String groupName = getValue(criteria.groupCriteria().Value());
Group group = OneDev.getInstance(GroupService.class).find(groupName);
if (group != null) {
if (!groups.containsKey(group)) {
TerminalNode digit = criteria.groupCriteria().DIGIT();
if (digit != null)
groups.put(group, Integer.parseInt(digit.getText()));
else
groups.put(group, 1);
} else {
throw new ExplicitException("Group '" + groupName + "' is included multiple times");
}
} else {
throw new ExplicitException("Unable to find group '" + groupName + "'");
}
}
}
}
return new ReviewRequirement(users, groups);
}
private static String getValue(TerminalNode terminal) {
return StringUtils.unescape(FenceAware.unfence(terminal.getText())).trim();
}
public List<User> getUsers() {
return users;
}
public Map<Group, Integer> getGroups() {
return groups;View on GitHub (pinned to d44925c47c)
Solutions
- Correct the group name in the requirement to an existing group
- Recreate the missing group or replace the clause with a user list
- Validate requirement strings with parse() in a try-catch before saving project settings
Example fix
// before reviewRequirement = "group:qaa"; // after reviewRequirement = "group:qa";
Defensive patterns
Strategy: validation
Validate before calling
GroupService groupService = OneDev.getInstance(GroupService.class);
for (String name : extractGroupNames(requirement)) {
if (groupService.find(name) == null)
throw new ExplicitException("Unknown group in requirement: " + name);
} Try / catch
try {
ReviewRequirement.parse(req);
} catch (ExplicitException e) {
ui.showError(e.getMessage());
} Prevention
- Select groups via a picker bound to GroupService.find
- Audit requirements when groups are deleted
- Fail fast by parsing at settings-save time
When it happens
Trigger: Parsing a requirement referencing a group that was deleted, renamed, or misspelled, e.g. 'group:qaa'.
Common situations: Group removal without updating project review settings; importing config from another instance; typo or trailing whitespace in the group name.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- User '${userName}' is included multiple times
- Unable to find user '${userName}'
- Group '${groupName}' is included multiple times
- Unable to find group: ${groupName}
- Title is required
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/0fc3d43cf4cc28ad.
Report an issue: GitHub.