pentaho/pentaho-kettle · error · IdNotFoundException
Unable to get ID for job [name]
Error message
Unable to get ID for job [name]
What it means
Repository lookup failure in PurRepository.getJobId: resolving the object id for the named job in the given directory failed. The IdNotFoundException carries the job name, directory path, and type so callers can distinguish missing jobs from other repository errors.
Solutions
- Verify the job name and directory path (list the directory with getJobNames(directory, false)).
- Use repository directory objects from loadRepositoryDirectory/getRepositoryDirectory instead of hand-built paths.
- Handle IdNotFoundException explicitly to distinguish 'not found' from infrastructure errors.
- Search the whole repository (getJobNames with root dir) if the location is uncertain.
Example fix
// before
ObjectId id = repository.getJobId("ETL_Job", dir); // NPE / IdNotFound if missing
// after
ObjectId id;
try {
id = repository.getJobId("ETL_Job", dir);
} catch (IdNotFoundException e) {
id = null; // job absent; create or report to user
} Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check existence String[] existing = repository.getJobNames(dir == null ? rootDir : dir, false); boolean present = Arrays.asList(existing).contains(name);
Type guard
boolean jobPresent = (String n, RepositoryDirectoryInterface d) -> d != null && Arrays.asList(repository.getJobNames(d, false)).contains(n);
Try / catch
try { id = repository.getJobId(name, dir); } catch (IdNotFoundException e) { log.warn("job not found: " + e.getMessage()); id = null; } Prevention
- Use actual RepositoryDirectory objects, never hand-built paths.
- Confirm job names case-sensitively before lookup.
- Catch IdNotFoundException specifically, not generic KettleException.
- Search root directory when the exact location is unknown.
When it happens
Trigger: Calling getJobId(name, directory) when no job file with that exact name exists in the given repository directory (or the directory is null/invalid), or the listing/lookup call itself fails.
Common situations: Hardcoded job paths broken after renames/moves; case-sensitivity mismatch on job names; passing null directory expecting root; saving to a different folder than the lookup expects.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- AutoDoc.Exception.RepositoryDirectoryNotFound
- Error saving job
- JobMeta.Exception.CanNotFindJob
- Unable to get all job names
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/af8364c2448a96ad.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:1552
// implemented by RepositoryProxy
throw new UnsupportedOperationException();
}
@Override
public boolean getJobEntryAttributeBoolean( ObjectId arg0, int arg1, String arg2, boolean arg3 )
throws KettleException {
// implemented by RepositoryProxy
throw new UnsupportedOperationException();
}
@Override
public ObjectId getJobId( final String name, final RepositoryDirectoryInterface repositoryDirectory )
throws KettleException {
try {
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 );
}
}
View on GitHub (pinned to f3058517a1)