alibaba/nacos · error · NacosApiException
DATA_ACCESS_ERROR
DATA_ACCESS_ERROR
Error message
Failed to create ARD Skill artifact
What it means
Thrown when packaging a Skill into a ZIP artifact fails. skillArtifact() first queries the skill, then calls SkillUtils.toZipBytes(result.getSkill()) inside a try/catch. Any Exception (typically IOException from ZIP serialization or a malformed skill model) is wrapped as DATA_ACCESS_ERROR with HTTP 500. This is a server-side processing failure, not a client input error.
Source
Thrown at ai-registry-adaptor/src/main/java/com/alibaba/nacos/airegistry/service/ard/ArdArtifactService.java:105
if (AiResourceConstants.RESOURCE_TYPE_MCP.equals(resourceType)) {
McpServerDetailInfo detail = mcpServerOperationService.getMcpServerDetail(namespaceId,
resourceName, mcpName, version);
return new ArdArtifact(ArdProtocolConstants.MEDIA_TYPE_MCP, detail);
}
throw new NacosApiException(NacosException.INVALID_PARAM,
ErrorCode.PARAMETER_VALIDATE_ERROR,
"Unsupported ARD artifact resourceType: " + resourceType);
}
private ArdArtifact skillArtifact(String namespaceId, String resourceName, String version)
throws NacosException {
SkillQueryResult result =
skillClientOperationService.querySkill(namespaceId, resourceName, version, null, null);
try {
return new ArdArtifact(ArdProtocolConstants.MEDIA_TYPE_SKILL_PACKAGE,
SkillUtils.toZipBytes(result.getSkill()));
} catch (Exception e) {
throw new NacosApiException(NacosException.SERVER_ERROR,
ErrorCode.DATA_ACCESS_ERROR, e, "Failed to create ARD Skill artifact");
}
}
private ArdArtifact promptArtifact(String namespaceId, String resourceType,
String resourceName, String version) throws NacosException {
AiResourceVersion resourceVersion =
readableOnlineVersion(namespaceId, resourceType, resourceName, version);
byte[] bytes = readResourceFile(resourceVersion, namespaceId, resourceType, resourceName,
version, PromptUtils.PROMPT_MAIN_DATA_ID);
PromptVersionInfo prompt = JacksonUtils.toObj(new String(bytes, StandardCharsets.UTF_8),
PromptVersionInfo.class);
return new ArdArtifact(ArdProtocolConstants.MEDIA_TYPE_PROMPT, prompt);
}
private AiResourceVersion readableOnlineVersion(String namespaceId, String resourceType,
String resourceName, String version) throws NacosException {
AiResource meta = resourceManager.findMeta(namespaceId, resourceName, resourceType);View on GitHub (pinned to 9b989acdf1)
Solutions
- Check the server logs for the wrapped cause (the original Exception is attached) to identify the serialization failure.
- Re-publish or repair the skill whose resourceName@version triggered the error, ensuring all required skill files are present.
- Verify the skill model version matches the SkillUtils.toZipBytes implementation (no client/server model skew).
- If transient I/O, retry the artifact request once.
Defensive patterns
Strategy: try-catch
Try / catch
try {
ArdArtifact artifact = ardArtifactService.get(ns, "skill", name, version, null);
} catch (NacosApiException e) {
if (ErrorCode.DATA_ACCESS_ERROR.equals(e.getErrorCode())) {
log.error("Skill artifact packaging failed for {}@{}", name, version, e);
// surface a retry or re-publish guidance to the operator
} else {
throw e;
}
} Prevention
- Publish skills through the validated publisher API so required artifact files are always present.
- Monitor server logs for the wrapped cause to catch model skew early.
- Add a health check that packages one skill per version to detect serialization regressions.
When it happens
Trigger: Requesting an ARD artifact for a skill whose underlying Skill object cannot be serialized to a ZIP (e.g., a skill with missing required artifact files, a null/binary-incompatible skill model, or a filesystem/encoding error during zip construction). The skill must already exist (querySkill succeeded) but its content is malformed.
Common situations: A skill was registered with incomplete or corrupted artifact data; a version upgrade changed the Skill model shape so toZipBytes hits a null field; transient I/O pressure on the server during ZIP streaming; a skill published through a buggy importer.
Related errors
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/17212c0427439491.
Report an issue: GitHub.