theonedev/onedev · error · NotFoundException
Unable to find group: ${groupName}
Error message
Unable to find group: ${groupName} What it means
QueryUtils.getGroup resolves a group name to a Group via GroupService.find. When the group does not exist, it throws NotFoundException("Unable to find group: ..."), failing queries that reference unknown groups.
Source
Thrown at server-core/src/main/java/io/onedev/server/util/QueryUtils.java:98
public static long getLongValue(String value) {
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
throw new NotAcceptableException("Invalid number: " + value);
}
}
public static User getUser(String loginName) {
User user = OneDev.getInstance(UserService.class).findByName(loginName);
if (user == null)
throw new NotFoundException("Unable to find user with login: " + loginName);
return user;
}
public static Group getGroup(String groupName) {
Group group = OneDev.getInstance(GroupService.class).find(groupName);
if (group == null)
throw new NotFoundException("Unable to find group: " + groupName);
return group;
}
public static Project getProject(String projectPath) {
Project project = OneDev.getInstance(ProjectService.class).findByPath(projectPath);
if (project == null)
throw new NotFoundException("Unable to find project '" + projectPath + "'");
return project;
}
public static boolean getBooleanValue(String value) {
if (value.equals("true"))
return true;
else if (value.equals("false"))
return false;
else
throw new NotAcceptableException("Invalid boolean: " + value);
}View on GitHub (pinned to d44925c47c)
Solutions
- Check the exact group name in Administration > Groups and correct the query
- Recreate the group if it was deleted and is still referenced
- Update saved queries after group renames or directory-sync name changes
Example fix
// before
QueryUtils.getGroup("devops"); // throws if group is 'DevOps'
// after
QueryUtils.getGroup("DevOps"); Defensive patterns
Strategy: validation
Validate before calling
Group group = OneDev.getInstance(GroupService.class).find(groupName); boolean groupExists = group != null;
Try / catch
try {
Group g = QueryUtils.getGroup(groupName);
} catch (NotFoundException e) {
// surface a list of existing groups for correction
} Prevention
- Use group pickers fed by the API instead of typed names
- Re-check saved queries after group renames or LDAP/SSO sync changes
- Standardize group naming to avoid case and typo mistakes
When it happens
Trigger: Using a group name in an issue query criterion (e.g. group-based field conditions) where the group was deleted, renamed, or the name is misspelled.
Common situations: Saved queries broken after group reorganization/renames; typos in group names; groups synced from LDAP/SSO whose names changed; REST consumers using stale group lists.
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
- Undefined label: ${labelName}
- Unable to find user with login: ${loginName}
- Iteration '${iterationName}' not found
- Link spec not found: ${linkName}
- Pull request not found:
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/9faf97f7ace04a5f.
Report an issue: GitHub.