pentaho/pentaho-kettle · error · KettleException
Unable to verify if the job with name [name] in directory…
Error message
Unable to verify if the job with name [name] in directory [repositoryDirectory] exists
What it means
Thrown by KettleDatabaseRepositoryJobDelegate.existsJobMeta when the underlying repository lookup (getJobID) fails with a KettleException, so existence of the job could not be verified. It wraps the original cause; the message distinguishes 'could not check' from 'job does not exist'. Callers of repository.exists(jobMeta) hit this when the database connection or metadata query breaks.
Solutions
- Check the wrapped cause (e.getCause()) to see the real database error and fix it first (connectivity, credentials).
- Verify the repository connection is alive; reconnect via repository.connect() before retrying the existence check.
- Ensure the RepositoryDirectory was loaded from the repository (not constructed in-memory) so its ObjectId is non-null.
- Confirm the repository schema is up to date (run the repository creation/upgrade scripts so r_job exists).
Example fix
// before: checking existence on an unsaved, in-memory directory
RepositoryDirectory dir = new RepositoryDirectory();
boolean exists = repo.exists("MyJob", dir, RepositoryObjectType.JOB);
// after: load the directory from the repository first
RepositoryDirectory dir = repo.loadRepositoryDirectoryTree().findDirectory("/jobs");
boolean exists = repo.exists("MyJob", dir, RepositoryObjectType.JOB); Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight check
if (repo == null || !repo.isConnected()) throw new IllegalStateException("Repository not connected");
if (name == null || name.isEmpty()) throw new IllegalArgumentException("Job name required");
if (directory == null || directory.getObjectId() == null) throw new IllegalArgumentException("Directory must be loaded from repository (non-null ObjectId)"); Type guard
boolean isUsableDirectory(RepositoryDirectoryInterface d) {
return d != null && d.getObjectId() != null;
} Try / catch
try {
exists = repo.exists("MyJob", dir, RepositoryObjectType.JOB);
} catch (KettleException e) {
Throwable root = e;
while (root.getCause() != null) root = root.getCause();
// log root; reconnect and retry if it was a connection failure
repo.connect();
} Prevention
- Always load the directory tree from the repository before existence checks (never use a bare new RepositoryDirectory()).
- Keep the repository session alive; reconnect after DB restarts or long idle periods.
- Keep repository schema version in sync with the Pentaho client version.
- Log e.getCause() chains to diagnose the real database problem quickly.
When it happens
Trigger: Calling repository.exists(jobMeta) (which invokes existsJobMeta) when the underlying database query for r_job fails: DB connection lost, repository tables missing/corrupted, or directory ObjectId is null/invalid (job not yet saved into a valid directory).
Common situations: Stale repository connection after a network blip or DB restart; querying existence in a directory object that was never saved (null ObjectId); repository schema missing the r_job table after an incomplete upgrade; wrong repository credentials producing permission failures on select.
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
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
- AnalyticQueryMeta.Exception.UnexpectedErrorInReadingStepInfo…
- AppendMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7330c1c990113b78.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobDelegate.java:282
*
* @throws KettleException
* Upon any error.
*/
private void saveJobParameters( JobMeta jobMeta ) throws KettleException {
String[] paramKeys = jobMeta.listParameters();
for ( int idx = 0; idx < paramKeys.length; idx++ ) {
String desc = jobMeta.getParameterDescription( paramKeys[idx] );
String defValue = jobMeta.getParameterDefault( paramKeys[idx] );
insertJobParameter( jobMeta.getObjectId(), idx, paramKeys[idx], defValue, desc );
}
}
public boolean existsJobMeta( String name, RepositoryDirectoryInterface repositoryDirectory,
RepositoryObjectType objectType ) throws KettleException {
try {
return ( getJobID( name, repositoryDirectory.getObjectId() ) != null );
} catch ( KettleException e ) {
throw new KettleException( "Unable to verify if the job with name ["
+ name + "] in directory [" + repositoryDirectory + "] exists", e );
}
}
/**
* Load a job from the repository
*
* @param jobname
* The name of the job
* @param repdir
* The directory in which the job resides.
* @throws KettleException
*/
public JobMeta loadJobMeta( String jobname, RepositoryDirectoryInterface repdir ) throws KettleException {
return loadJobMeta( jobname, repdir, null );
}
/**View on GitHub (pinned to f3058517a1)