{"record":{"id":"8f77d1ed585044a2","repo":"jenkinsci/jenkins","slug":"no-such-item-job-s-exists","errorCode":null,"errorMessage":"No such item '{job_s}' exists.","messagePattern":"No such item '(.+?)' exists\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/ReloadJobCommand.java","lineNumber":79,"sourceCode":"        boolean errorOccurred = false;\n        final Jenkins jenkins = Jenkins.get();\n\n        final HashSet<String> hs = new HashSet<>(jobs);\n\n        for (String job_s : hs) {\n            AbstractItem job = null;\n\n            try {\n                Item item = jenkins.getItemByFullName(job_s);\n                if (item instanceof AbstractItem) {\n                    job = (AbstractItem) item;\n                } else if (item != null) {\n                    LOGGER.log(Level.WARNING, \"Unsupported item type: {0}\", item.getClass().getName());\n                }\n\n                if (job == null) {\n                    AbstractItem project = Items.findNearest(AbstractItem.class, job_s, jenkins);\n                    throw new IllegalArgumentException(project == null ?\n                        \"No such item \\u2018\" + job_s + \"\\u2019 exists.\" :\n                        String.format(\"No such item \\u2018%s\\u2019 exists. Perhaps you meant \\u2018%s\\u2019?\",\n                                job_s, project.getFullName()));\n                }\n\n                job.checkPermission(Item.CONFIGURE);\n                job.doReload();\n            } catch (Exception e) {\n                if (hs.size() == 1) {\n                    throw e;\n                }\n\n                final String errorMsg = job_s + \": \" + e.getMessage();\n                stderr.println(errorMsg);\n                errorOccurred = true;\n                continue;\n            }\n        }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/ReloadJobCommand.java#L61-L97","documentation":"Thrown by the `reload-job` CLI command when getItemByFullName returns null or a non-AbstractItem, and Items.findNearest(AbstractItem.class, ...) returns null (no near match). Note the message uses Unicode curly quotes (\\u2018 \\u2019). The job variable stays null when the item is missing or is not an AbstractItem (e.g. a Folder).","triggerScenarios":"`reload-job <name>` where <name> is not an existing AbstractItem and no near AbstractItem name exists.","commonSituations":"Job renamed/deleted; name refers to a Folder or other non-AbstractItem; missing the folder path prefix in a nested-job setup.","solutions":["List reloadable items and copy the full name (including folder path).","Confirm the target is an AbstractItem (job), not a Folder or view.","Use the suggested name if one is offered."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Item it = Jenkins.get().getItemByFullName(name);\nif (!(it instanceof AbstractItem)) {\n    throw new IllegalArgumentException(\"Not a reloadable item: \" + name);\n}","typeGuard":"boolean isReloadable(Item it) { return it instanceof AbstractItem; }","tryCatchPattern":"catch (IllegalArgumentException e) { /* name missing/not a job */ }","preventionTips":["Resolve jobs via getItemByFullName and check AbstractItem before reload.","Use full folder-qualified names."],"tags":["cli","job","configuration","not-found"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}