jenkinsci/jenkins · error · IllegalArgumentException
No such item '%s' exists. Perhaps you meant '%s'?
Error message
No such item '%s' exists. Perhaps you meant '%s'?
What it means
Same reload-job null-job path, but Items.findNearest found a near AbstractItem, so the message (String.format with Unicode curly quotes) suggests it. Fires when the looked-up item is absent/not an AbstractItem and a plausible AbstractItem exists.
Source
Thrown at core/src/main/java/hudson/cli/ReloadJobCommand.java:79
boolean errorOccurred = false;
final Jenkins jenkins = Jenkins.get();
final HashSet<String> hs = new HashSet<>(jobs);
for (String job_s : hs) {
AbstractItem job = null;
try {
Item item = jenkins.getItemByFullName(job_s);
if (item instanceof AbstractItem) {
job = (AbstractItem) item;
} else if (item != null) {
LOGGER.log(Level.WARNING, "Unsupported item type: {0}", item.getClass().getName());
}
if (job == null) {
AbstractItem project = Items.findNearest(AbstractItem.class, job_s, jenkins);
throw new IllegalArgumentException(project == null ?
"No such item \u2018" + job_s + "\u2019 exists." :
String.format("No such item \u2018%s\u2019 exists. Perhaps you meant \u2018%s\u2019?",
job_s, project.getFullName()));
}
job.checkPermission(Item.CONFIGURE);
job.doReload();
} catch (Exception e) {
if (hs.size() == 1) {
throw e;
}
final String errorMsg = job_s + ": " + e.getMessage();
stderr.println(errorMsg);
errorOccurred = true;
continue;
}
}View on GitHub (pinned to 2e228ff40b)
Solutions
- Use the suggested full name.
- Verify with `Jenkins.get().getItemByFullName(name)` and re-run.
Defensive patterns
Strategy: validation
Validate before calling
AbstractItem near = Items.findNearest(AbstractItem.class, name, Jenkins.get());
if (near != null) { /* offer near.getFullName() */ } Try / catch
catch (IllegalArgumentException e) { /* suggestion in message */ } Prevention
- Use findNearest to suggest corrections interactively.
- Keep job-name constants in sync after renames.
When it happens
Trigger: `reload-job <name>` with a typo close to a real job's full name.
Common situations: Typo; job moved into a folder so the bare name no longer resolves; case mismatch.
Related errors
- No such item '{job_s}' exists.
- Cannot build {0} because it is disabled.
- No such job '
- No such agent "{node_s}" exists.
- No such agent "{node_s}" exists. Did you mean "{adv}"?
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/cb33570e38248b96.
Report an issue: GitHub.