{"record":{"id":"9eaac7f2e6619f70","repo":"theonedev/onedev","slug":"unable-to-find-project","errorCode":null,"errorMessage":"Unable to find project: ","messagePattern":"Unable to find project: ","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-plugin/server-plugin-import-jiracloud/src/main/java/io/onedev/server/plugin/imports/jiracloud/ImportServer.java","lineNumber":373,"sourceCode":"\t\t\tfor (var jiraProject: projects.getImportProjects()) {\n\t\t\t\tOneDev.getInstance(TransactionService.class).run(() -> {\n\t\t\t\t\tString oneDevProjectPath = jiraProject;\n\t\t\t\t\tif (projects.getParentOneDevProject() != null)\n\t\t\t\t\t\toneDevProjectPath = projects.getParentOneDevProject() + \"/\" + oneDevProjectPath;\n\n\t\t\t\t\tlogger.log(\"Importing from '\" + jiraProject + \"' to '\" + oneDevProjectPath + \"'...\");\n\n\t\t\t\t\tProjectService projectService = OneDev.getInstance(ProjectService.class);\n\t\t\t\t\tProject project = projectService.setup(SecurityUtils.getSubject(), oneDevProjectPath);\n\n\t\t\t\t\tif (!project.isNew() && !SecurityUtils.canManageProject(project)) {\n\t\t\t\t\t\tthrow new UnauthorizedException(\"Import target already exists. \" +\n\t\t\t\t\t\t\t\t\"You need to have project management privilege over it\");\n\t\t\t\t\t}\n\n\t\t\t\t\tJsonNode projectNode = projectNodes.get(jiraProject);\n\t\t\t\t\tif (projectNode == null)\n\t\t\t\t\t\tthrow new ExplicitException(\"Unable to find project: \" + jiraProject);\n\n\t\t\t\t\tString apiEndpoint = getApiEndpoint(\"/project/\" + projectNode.get(\"id\").asText());\n\n\t\t\t\t\t// Get more detail project information\n\t\t\t\t\tprojectNode = JerseyUtils.get(client, apiEndpoint, logger);\n\n\t\t\t\t\tproject.setDescription(projectNode.get(\"description\").asText(null));\n\n\t\t\t\t\tif (!dryRun && project.isNew()) {\n\t\t\t\t\t\tprojectService.create(SecurityUtils.getUser(), project);\n\t\t\t\t\t\tOneDev.getInstance(AuditService.class).audit(project, \"created project\", null, VersionedXmlDoc.fromBean(project).toXML());\n\t\t\t\t\t}\n\n\t\t\t\t\tlogger.log(\"Importing issues...\");\n\t\t\t\t\tImportResult currentResult = importIssues(projectNode, project, option, userIds, dryRun, logger);\n\t\t\t\t\tresult.nonExistentLogins.addAll(currentResult.nonExistentLogins);\n\t\t\t\t\tresult.errorAttachments.addAll(currentResult.errorAttachments);\n\t\t\t\t\tresult.tooLargeAttachments.addAll(currentResult.tooLargeAttachments);","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-plugin/server-plugin-import-jiracloud/src/main/java/io/onedev/server/plugin/imports/jiracloud/ImportServer.java#L355-L391","documentation":"In the Jira Cloud import's importProjects(), after fetching the visible project list via getProjectNodes(), the code looks up the Jira project by key in the projectNodes map and throws this ExplicitException when the key is absent. It means the import mapping references a Jira project that the Jira Cloud REST API did not return for the configured credentials.","triggerScenarios":"importProjects() runs, projectNodes.get(jiraProject) returns null for one of the configured project mappings — i.e. the Jira project key in the import option does not match any project returned by the Jira project-search endpoint for this token.","commonSituations":"Typo in the Jira project key (case-sensitive, e.g. PROJ vs Proj); Jira account/token lacking browse permission on that project; the project was archived or deleted in Jira after the mapping was saved; importing from a different Jira site than the one containing the project.","solutions":["Verify the Jira project key in the import mapping matches exactly (uppercase, case-sensitive) the key shown in Jira project settings.","Check the Jira API token/user has Browse Projects permission on the missing project, and that the project is not archived.","Confirm the import is pointed at the correct Jira site/base URL that actually contains the project.","Check the import log listing which Jira projects are visible and pick one of those keys."],"exampleFix":"// before\njiraProject = \"MyProject\"        // actual Jira key is MYPROJ\n// after\njiraProject = \"MYPROJ\"           // exact key from Jira project settings","handlingStrategy":"validation","validationCode":"boolean visible = importServer.getProjectNodes(logger).containsKey(jiraProjectKey);\nif (!visible) throw new IllegalArgumentException(\"Jira project not visible: \" + jiraProjectKey);","typeGuard":null,"tryCatchPattern":"try { importServer.doImport(...) } catch (ExplicitException e) { if (e.getMessage().startsWith(\"Unable to find project\")) { /* correct project key in option */ } }","preventionTips":["Copy Jira project keys directly from Jira settings (exact case).","Verify token browse permissions on all mapped projects.","Re-save import options after Jira projects are renamed/archived."],"tags":["import","jira-cloud","project-not-found","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}