theonedev/onedev · error · ExplicitException
Unable to find specified artifact (project: %s, build number
Error message
Unable to find specified artifact (project: %s, build number: %d, artifact path: %s)
What it means
deleteArtifact (and related artifact access in DefaultBuildService) resolves the artifact path under the build's artifacts directory and throws this formatted NotFound when no file or directory exists at that path; project, build number and path are interpolated.
Source
Thrown at server-core/src/main/java/io/onedev/server/service/impl/DefaultBuildService.java:1201
@Override
public void deleteArtifact(Build build, @Nullable String artifactPath) {
Long projectId = build.getProject().getId();
Long buildNumber = build.getNumber();
projectService.runOnActiveServer(projectId, () -> write(getArtifactsLockName(projectId, buildNumber), () -> {
File artifactsDir = getArtifactsDir(projectId, buildNumber);
if (artifactPath != null) {
File artifactFile = new File(artifactsDir, artifactPath);
if (artifactFile.exists()) {
if (artifactFile.isFile())
FileUtils.deleteFile(artifactFile);
else
FileUtils.deleteDir(artifactsDir);
} else {
String errorMessage = String.format(
"Unable to find specified artifact (project: %s, build number: %d, artifact path: %s)",
projectId, buildNumber, artifactPath);
throw new ExplicitException(errorMessage);
}
} else {
FileUtils.cleanDir(artifactsDir);
}
projectService.directoryModified(projectId, artifactsDir);
return null;
}));
}
@Override
public void syncBuilds(Long projectId, String activeServer) {
projectService.syncDirectory(projectId, BUILDS_DIR, (suffix) -> {
projectService.syncDirectory(projectId, BUILDS_DIR + "/" + suffix, (buildNumberString) -> {
var buildNumber = valueOf(buildNumberString);
var buildPath = getProjectRelativeDirPath(buildNumber);
projectService.syncFile(projectId, buildPath + "/" + LOG_FILE,
getLogLockName(projectId, buildNumber), activeServer);
if (clusterService.runOnServer(activeServer, () -> getArtifactsDir(projectId, buildNumber).exists())) {View on GitHub (pinned to d44925c47c)
Solutions
- Verify the artifact was published by the build (check the build's artifact listing).
- Correct the artifact path, including whether it points to a file or directory.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server-core/src/main/java/io/onedev/server/service/impl/DefaultBuildService.java:1201 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/088433f862c81c15.
Report an issue: GitHub.