pentaho/pentaho-kettle · error · KettleException

Unable to get all job names

Error message

Unable to get all job names

What it means

PurRepository.getJobNames wraps failures from getAllFilesOfType (the Pentaho repository listing of JOB-type files, optionally including deleted ones) in a generic KettleException with this message. It fires when the underlying repository call fails — typically due to connectivity, authentication, permissions, or a bad directory ObjectId — so the list of job names for the directory cannot be retrieved. Fix by checking repository connectivity/permissions and validating the directory ObjectId.

Solutions

  1. Re-resolve the directory ObjectId (it may be stale) via getRepositoryDirectory(true).
  2. Verify the directory still exists in the repository explorer.
  3. Check the cause chain for the underlying repository exception.
  4. Catch KettleException and return an empty list for read-only browsing.

Example fix

// before
String[] names = repository.getJobNames(dirId, false);
// after
String[] names;
try {
  names = repository.getJobNames(dirId, false);
} catch (KettleException e) {
  logError("Directory listing failed", e);
  names = new String[0];
}
Defensive patterns

Strategy: try-catch

Validate before calling

// refresh the directory object to avoid stale IDs
RepositoryDirectoryInterface fresh = repository.getRepositoryDirectory(true);
if (fresh == null) throw new IllegalStateException("no root directory");

Type guard

boolean dirValid = id -> id != null && !id.equals(new StringObjectId(""));

Try / catch

try { names = repository.getJobNames(dirId, false); } catch (KettleException e) { log.error("job listing failed", e); names = new String[0]; }

Prevention

When it happens

Trigger: Calling getJobNames(idDirectory, includeDeleted) when the directory ID is invalid/deleted or the repository file service fails to list children.

Common situations: Directory deleted or renamed by another user; stale cached directory ObjectId; transient repository outage while browsing in Spoon.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/398c9c6252d12ca3. Report an issue: GitHub.

Appendix: source

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

      return getObjectId( name, repositoryDirectory, RepositoryObjectType.JOB, false );
    } catch ( Exception e ) {
      String path = repositoryDirectory != null ? repositoryDirectory.toString() : "null";
      throw new IdNotFoundException( "Unable to get ID for job [" + name + "]", e, name, path,
        RepositoryObjectType.JOB );
    }
  }

  @Override
  public String[] getJobNames( ObjectId idDirectory, boolean includeDeleted ) throws KettleException {
    try {
      List<RepositoryFile> children = getAllFilesOfType( idDirectory, RepositoryObjectType.JOB, includeDeleted );
      List<String> names = new ArrayList<String>();
      for ( RepositoryFile file : children ) {
        names.add( file.getTitle() );
      }
      return names.toArray( new String[ 0 ] );
    } catch ( Exception e ) {
      throw new KettleException( "Unable to get all job names", e );
    }
  }

  @Override
  public List<RepositoryElementMetaInterface> getJobObjects( ObjectId idDirectory, boolean includeDeleted )
    throws KettleException {
    return getPdiObjects( idDirectory, Arrays.asList( new RepositoryObjectType[] { RepositoryObjectType.JOB } ),
      includeDeleted );
  }

  @Override
  public LogChannelInterface getLog() {
    return log;
  }

  @Override
  public String getName() {
    return repositoryMeta.getName();

View on GitHub (pinned to f3058517a1)