{"record":{"id":"f91e431eacc2dd8f","repo":"theonedev/onedev","slug":"unknown-gav","errorCode":null,"errorMessage":"Unknown GAV","messagePattern":"Unknown GAV","errorType":"http","errorClass":"HttpResponseAwareException","httpStatus":404,"severity":"error","filePath":"server-plugin/server-plugin-pack-maven/src/main/java/io/onedev/server/plugin/pack/maven/MavenPackHandler.java","lineNumber":329,"sourceCode":"\t\t\t\t\t\t\t\tresponse.setContentType(MediaType.APPLICATION_XML);\n\t\t\t\t\t\t\telse if (fileName.endsWith(EXT_JAR))\n\t\t\t\t\t\t\t\tresponse.setContentType(CONTENT_TYPE_JAR);\n\t\t\t\t\t\t\tpackBlobService.downloadBlob(packBlobInfo.getLeft(), sha256BlobHash, \n\t\t\t\t\t\t\t\t\tresponse.getOutputStream());\n\t\t\t\t\t\t\tresponse.setStatus(SC_OK);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new HttpResponseAwareException(SC_NOT_FOUND, \"Unknown file\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresponse.setStatus(SC_OK);\n\t\t\t\tresponse.setDateHeader(LAST_MODIFIED, packInfo.getRight().getTime());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new HttpResponseAwareException(SC_NOT_FOUND, \"Unknown GAV\");\n\t\t}\n\t}\n\t\n\tprivate void uploadBlob(HttpServletRequest request, HttpServletResponse response,\n\t\t\t\t\t\t\tLong projectId, Long buildId, String groupId, @Nullable String artifactId, \n\t\t\t\t\t\t\t@Nullable String version, String fileName) {\n\t\tsessionService.run(() -> {\n\t\t\tcheckProject(projectId, true);\n\t\t});\n\t\ttry (var is = request.getInputStream()) {\n\t\t\tvar lockName = \"update-pack:\" + projectId + \":\" + TYPE + \":\" + groupId;\n\t\t\tif (artifactId != null && version != null)\n\t\t\t\tlockName += \":\" + artifactId + \":\" + version;\n\t\t\tvar blobName = getBlobName(fileName);\n\t\t\tif (!blobName.equals(fileName)) { // checksum verification\n\t\t\t\tvar baos = new ByteArrayOutputStream();\n\t\t\t\tvar copied = copyWithMaxSize(is, baos, MAX_CHECKSUM_LEN);\n\t\t\t\tif (copied == -1)","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-plugin/server-plugin-pack-maven/src/main/java/io/onedev/server/plugin/pack/maven/MavenPackHandler.java#L311-L347","documentation":"Thrown by MavenPackHandler.serveBlob when serving a Maven artifact over the pack repository endpoint: the requested groupId/artifactId/version (GAV) could not be resolved to an existing pack for the project. OneDev stores Maven artifacts as packs keyed by TYPE 'maven' and name groupId:artifactId; if no pack (or matching version) is found, the handler responds with HTTP 404 and this message.","triggerScenarios":"A Maven/Gradle client requests an artifact path whose last path segments parse to a groupId/artifactId (via getGroupIdAndArtifactId) and a version, but findPack(project, groupId, artifactId, version) returns null — e.g. the artifact was never uploaded to this project, the version does not exist, or the wrong project id is used in the repository URL.","commonSituations":"Typo in coordinates in pom.xml/gradle dependencies; depending on an artifact published to a different OneDev project; snapshot cleanup removed the version; misspelled repository URL pointing at the wrong project; client caches referencing a deleted pack.","solutions":["Verify the groupId:artifactId:version in your build file matches an artifact actually published to that OneDev project (Project > Packages).","Check the repository URL points at the correct project that has pack management enabled and contains the artifact.","Publish/upload the missing artifact (mvn deploy against the OneDev repository) before depending on it.","If a snapshot version disappeared, redeploy it or switch to a released version."],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>com.acme</groupId>\n  <artifactId>lib</artifactId>\n  <version>1.2.0</version>\n</dependency>\n// after — use a version that exists in the project's package list\n<version>1.1.0</version>","handlingStrategy":"validation","validationCode":"// Before depending on the artifact, confirm the GAV exists in the target project\nasync function assertGavExists(baseUrl, projectId, group, artifact, version, token) {\n  const res = await fetch(`${baseUrl}/~api/packs?projectId=${projectId}&type=maven&q=${group}:${artifact}:${version}`, { headers: { Authorization: `Bearer ${token}` } });\n  if (!res.ok) throw new Error(`lookup failed: HTTP ${res.status}`);\n  const packs = await res.json();\n  if (!packs || packs.length === 0) throw new Error(`GAV ${group}:${artifact}:${version} not published to project ${projectId}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep coordinates in one source of truth (parent pom/version catalog) so typos can't diverge.","Verify deployments in CI by resolving the artifact immediately after publishing.","Pin exact released versions; avoid deleted snapshot versions in dependencies."],"tags":["maven","http-404","artifact-not-found","package-registry"],"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"}