{"record":{"id":"971bf028d62ac0ea","repo":"theonedev/onedev","slug":"upload-project-not-found","errorCode":null,"errorMessage":"Upload project not found: ","messagePattern":"Upload project not found: ","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/cache/ServerCacheProvisioner.java","lineNumber":97,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn CacheAvailability.NOT_FOUND;\n\t\t}\n\t}\n\n\t@Override\n\tprotected boolean upload(CacheConfigFacade config, String path, File pathDir, List<String> excludes) {\n\t\tvar key = config.getKey();\n\t\tvar checksum = config.getChecksum();\n\n\t\tvar projectId = getSessionService().call(() -> {\n\t\t\tProject uploadProject;\n\t\t\tif (config.getUploadProjectPath() != null) {\n\t\t\t\tvar uploadProjectPath = config.getUploadProjectPath();\n\t\t\t\tuploadProject = getProjectService().findByPath(uploadProjectPath);\n\t\t\t\tif (uploadProject == null)\n\t\t\t\t\tthrow new ExplicitException(\"Upload project not found: \" + uploadProjectPath);\n\t\t\t} else {\n\t\t\t\tuploadProject = getProjectService().load(getProjectId());\n\t\t\t}\n\n\t\t\tvar accessTokenValue = config.getUploadAccessToken();\n\t\t\tif (canUploadTo(uploadProject)) {\n\t\t\t\treturn uploadProject.getId();\n\t\t\t} else if (accessTokenValue != null) {\n\t\t\t\tvar accessToken = getAccessTokenService().findByValue(accessTokenValue);\n\t\t\t\tif (accessToken != null && SecurityUtils.canUploadCache(accessToken.asSubject(), uploadProject))\n\t\t\t\t\treturn uploadProject.getId();\n\t\t\t}\n\t\t\treturn null;\n\n\t\t});\n\n\t\tif (projectId != null) {\n\t\t\tvar activeServer = getProjectService().getActiveServer(projectId, true);","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/cache/ServerCacheProvisioner.java#L79-L115","documentation":"During cache/upload provisioning, when config.getUploadProjectPath() is set, ServerCacheProvisioner.upload looks up that project path via getProjectService().findByPath. If no project matches, it throws ExplicitException \"Upload project not found: <path>\", aborting the upload because the target project for uploaded cache/site data does not exist.","triggerScenarios":"Running a cache upload (e.g. cache provisioning between cluster members) where server cache/cluster config specifies uploadProjectPath that does not exist on the server: typo in path, project renamed, project deleted, or wrong server/instance targeted.","commonSituations":"Config copied from another OneDev instance where the project path differs; project renamed after the config was written; leading/trailing slash or case mismatch in the project path; running the upload against a fresh instance that lacks the project.","solutions":["Verify the project path in your server cache/cluster config and correct it to an existing project path (visible in the project URL).","Create the referenced project or recreate it with the same path if it was deleted/renamed.","Remove uploadProjectPath from the config to fall back to loading the project by the configured project id.","Run against the correct server instance that actually contains the referenced project."],"exampleFix":"// before (cluster config)\nuploadProjectPath: /my-projet   // typo\n\n// after\nuploadProjectPath: /my-project  // must match an existing project path","handlingStrategy":"validation","validationCode":"var project = OneDev.getInstance(ProjectService.class).findByPath(uploadProjectPath);\nif (project == null)\n    throw new ExplicitException(\"Fix uploadProjectPath in server cache config: \" + uploadProjectPath);","typeGuard":null,"tryCatchPattern":"try {\n    provisioner.upload(config);\n} catch (ExplicitException e) {\n    // e.getMessage() names the missing upload project path; fix config and retry\n}","preventionTips":["Copy project paths directly from the project URL instead of typing them.","Update cache/cluster configs when projects are renamed or deleted.","Verify the target instance actually contains the referenced project."],"tags":["configuration","project","upload","cluster"],"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-14T00:17:10.932Z"}