pentaho/pentaho-kettle · error · KettleException
We can't verify the existance of repository element type
Error message
We can't verify the existance of repository element type [{objectType}] What it means
KettleDatabaseRepository.exists only supports existence checks for JOB, TRANSFORMATION (and similar handled) element types; for any other RepositoryObjectType it throws this KettleException. The repository has no delegate for verifying existence of other element kinds via this API.
Solutions
- Only call exists() for JOB or TRANSFORMATION object types; branch on objectType first.
- For other types, use the type-specific delegate APIs (e.g. databaseDelegate / slaveServerDelegate lookup methods).
- Verify the element type before calling and use getObjectInformation as an alternative existence probe where supported.
Example fix
// before
boolean exists = repo.exists(name, dir, objectType); // any type
// after
boolean exists = objectType.equals(RepositoryObjectType.TRANSFORMATION)
|| objectType.equals(RepositoryObjectType.JOB)
? repo.exists(name, dir, objectType)
: false; // or use type-specific API Defensive patterns
Strategy: type-guard
Validate before calling
boolean existsSupported = objectType.equals(RepositoryObjectType.TRANSFORMATION)
|| objectType.equals(RepositoryObjectType.JOB);
if (!existsSupported) { /* use type-specific API or return false */ } Type guard
boolean supportsExists(RepositoryObjectType t) {
return RepositoryObjectType.TRANSFORMATION.equals(t) || RepositoryObjectType.JOB.equals(t);
} Try / catch
try {
return repo.exists(name, dir, objectType);
} catch (KettleException e) {
if (e.getMessage() != null && e.getMessage().contains("can't verify the existance")) {
return false; // or use a type-specific lookup
} else { throw e; }
} Prevention
- Only call exists() for jobs and transformations.
- Branch on RepositoryObjectType before generic existence checks.
- Prefer type-specific delegate lookups for other element kinds.
When it happens
Trigger: Calling KettleDatabaseRepository.exists(name, directory, objectType) with objectType other than JOB or TRANSFORMATION, e.g. a database, slave server or partition schema RepositoryObjectType.
Common situations: Generic repository-browser code that passes whatever element type it holds into exists(); plugins assuming exists() is universal; version changes in the supported-type switch.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Cannot assemble shared object of type
- It's not possible to save Class [" +…
- Object type was specified. Only information from…
- unknown type [" + typeToUpdate + "]
- We can't save the element with type
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/df6069d06f3bee33.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepository.java:434
}
// Common methods...
// ////////////////////////////
public boolean exists( String name, RepositoryDirectoryInterface repositoryDirectory,
RepositoryObjectType objectType ) throws KettleException {
try {
switch ( objectType ) {
case JOB:
securityProvider.validateAction( RepositoryOperation.READ_JOB );
return jobDelegate.existsJobMeta( name, repositoryDirectory, objectType );
case TRANSFORMATION:
securityProvider.validateAction( RepositoryOperation.READ_TRANSFORMATION );
return transDelegate.existsTransMeta( name, repositoryDirectory, objectType );
default:
throw new KettleException( "We can't verify the existance of repository element type ["
+ objectType + "]" );
}
} finally {
connectionDelegate.closeReadTransaction();
}
}
public void save( RepositoryElementInterface repositoryElement, String versionComment ) throws KettleException {
save( repositoryElement, versionComment, null );
}
public void save( RepositoryElementInterface repositoryElement, String versionComment,
ProgressMonitorListener monitor, boolean overwrite ) throws KettleException {
save( repositoryElement, versionComment, monitor, null, false, overwrite );
}
public void save( RepositoryElementInterface repositoryElement, String versionComment,
ProgressMonitorListener monitor, ObjectId parentId, boolean used, boolean overwrite ) throws KettleException {View on GitHub (pinned to f3058517a1)