apache/dolphinscheduler · error · ServiceException

Thr resource is not exists: ${resourceAbsolutePath}

Error message

Thr resource is not exists: ${resourceAbsolutePath}

What it means

AbstractResourceValidator.exceptionResourceNotExists throws this ServiceException when the storage operator reports that no file or directory exists at the given absolute resource path. It is a pre-flight guard used by resource validators before read/write operations. Note the typo 'Thr' in the message text.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/resource/AbstractResourceValidator.java:89

        }
    }

    public void exceptionFileContentInvalidated(String fileContent) {
        if (StringUtils.isEmpty(fileContent)) {
            throw new ServiceException("The file content is null");
        }
    }

    public void exceptionFileContentCannotFetch(String fileAbsolutePath) {
        String fileExtension = Files.getFileExtension(fileAbsolutePath);
        if (!FILE_SUFFIXES_WHICH_CAN_FETCH_CONTENT.contains(fileExtension)) {
            throw new ServiceException("The file type: " + fileExtension + " cannot be fetched");
        }
    }

    public void exceptionResourceNotExists(String resourceAbsolutePath) {
        if (!storageOperator.exists(resourceAbsolutePath)) {
            throw new ServiceException("Thr resource is not exists: " + resourceAbsolutePath);
        }
    }

    public void exceptionResourceExists(String resourceAbsolutePath) {
        if (storageOperator.exists(resourceAbsolutePath)) {
            throw new ServiceException("The resource is already exist: " + resourceAbsolutePath);
        }
    }

    public void exceptionResourceIsNotDirectory(String resourceAbsolutePath) {
        if (StringUtils.isNotEmpty(Files.getFileExtension(resourceAbsolutePath))) {
            throw new ServiceException("The path is not a directory: " + resourceAbsolutePath);
        }
    }

    public void exceptionResourceIsNotFile(String fileAbsolutePath) {
        if (StringUtils.isEmpty(Files.getFileExtension(fileAbsolutePath))) {
            throw new ServiceException("The path is not a file: " + fileAbsolutePath);

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Verify the resource exists in the configured storage backend at the exact absolute path shown in the message.
  2. Re-upload or recreate the resource via the Resources UI/API so the path is populated.
  3. Check dolphinscheduler resource storage configuration (resource.storage.type and base path) points at the backend that actually holds the file.
  4. Refresh the resource list; stale UI entries pointing at deleted files should be removed.

Example fix

// before: assuming a listed resource still exists
resourceService.readResource(path, skipLineNum, limit);
// after: check existence first
if (!storageOperator.exists(path)) {
    // re-upload or surface a friendly 'resource was deleted' message
}
Defensive patterns

Strategy: validation

Validate before calling

if (!storageOperator.exists(absolutePath)) { throw new IllegalStateException("Resource missing: " + absolutePath); }

Try / catch

try { validator.exceptionResourceNotExists(path); } catch (ServiceException e) { if (e.getMessage().contains("is not exists")) { /* re-upload or surface friendly message */ } else { throw e; } }

Prevention

When it happens

Trigger: Calling any resource API (read file, update, delete, download) whose validator invokes exceptionResourceNotExists with a path that was deleted by another user, mistyped, or never uploaded to the configured storage (HDFS/S3/local).

Common situations: Resource deleted from storage out-of-band while the UI still lists it; wrong tenantcode in path; storage backend switched (e.g. from local to HDFS) without migrating data; case-sensitivity mismatch on object stores.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/9eaf6fe95003109a. Report an issue: GitHub.