pentaho/pentaho-kettle · error · KettleFileException

PurRepository.ERROR_0003_JOB_NOT_FOUND

PurRepository.ERROR_0003_JOB_NOT_FOUND

Error message

PurRepository.ERROR_0003_JOB_NOT_FOUND (localized, takes jobname)

What it means

PurRepository throws ERROR_0003_JOB_NOT_FOUND when loadJob(jobname/path) cannot resolve the given job name to an absolute repository path (getPath() returned null). The localized message includes the job name supplied by the caller.

Solutions

  1. Check the job exists: repository.exists(jobPath, RepositoryObjectType.JOB) before loading
  2. Pass the correct RepositoryDirectoryInterface for the job's folder (or use findDirectory("/path"))
  3. Refresh the repository directory cache (reconnect) if the job was recently moved/renamed
  4. Verify repository connectivity and that you are pointed at the intended repository

Example fix

// before
JobMeta jm = repo.loadJob("nightly_etl", null, null, null);
// after
RepositoryDirectoryInterface dir = repo.findDirectory("/jobs");
if (repo.exists("nightly_etl", dir, RepositoryObjectType.JOB)) {
  JobMeta jm = repo.loadJob("nightly_etl", dir, null, null);
} else {
  throw new KettleException("Job not found in /jobs");
}
Defensive patterns

Strategy: validation

Validate before calling

RepositoryDirectoryInterface dir = repo.findDirectory("/jobs");
if (!repo.exists("nightly_etl", dir, RepositoryObjectType.JOB)) {
  throw new KettleException("Job not found under /jobs");
}

Type guard

boolean jobExists(Repository repo, String name, RepositoryDirectoryInterface dir) throws KettleException {
  return name != null && dir != null
      && repo.exists(name, dir, RepositoryObjectType.JOB);
}

Try / catch

try {
  JobMeta jm = repo.loadJob(jobname, dir, null, null);
} catch (KettleFileException e) {
  // ERROR_0003: path could not be resolved — prompt user to pick a job from repo.getJobObjects(dir)
}

Prevention

When it happens

Trigger: Calling PurRepository.loadJob(String jobname, RepositoryDirectoryInterface parentDir, String versionId, VariableSpace parent) where getPath(jobname, parentDir, RepositoryObjectType.JOB) returns null — the job does not exist under the given directory or the name/directory combination cannot be resolved.

Common situations: Job renamed/deleted in the repository; passing null or wrong RepositoryDirectory as parent; job lives in another repository; case-sensitivity or leading/trailing slash issues in the job name; resolving with an empty VariableSpace where relative paths were expected.

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 pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/9d7334a5b63685ae. Report an issue: GitHub.

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:2585

    }
    return transformations;
  }

  @Override
  public JobMeta loadJob( String jobname, RepositoryDirectoryInterface parentDir, ProgressMonitorListener monitor,
                          String versionId ) throws KettleException {
    return loadJob( jobname, parentDir, monitor, versionId, null );
  }

  @Override
  public JobMeta loadJob( String jobname, RepositoryDirectoryInterface parentDir, ProgressMonitorListener monitor,
                          String versionId, VariableSpace parent ) throws KettleException {
    String absPath = null;
    try {
      absPath = getPath( jobname, parentDir, RepositoryObjectType.JOB );
      if ( absPath == null ) {
        // Couldn't resolve path, throw an exception
        throw new KettleFileException(
          BaseMessages.getString( PKG, "PurRepository.ERROR_0003_JOB_NOT_FOUND", jobname ) );
      }

      readWriteLock.readLock().lock();
      RepositoryFile file;
      NodeRepositoryFileData data = null;
      ObjectRevision revision = null;
      try {
        file = pur.getFile( absPath );
        if ( versionId != null ) {
          // need to go back to server to get versioned info
          file = pur.getFileAtVersion( file.getId(), versionId );
        }

        data = pur.getDataAtVersionForRead( file.getId(), versionId, NodeRepositoryFileData.class );
      } finally {
        readWriteLock.readLock().unlock();
      }

View on GitHub (pinned to f3058517a1)