pentaho/pentaho-kettle · error · KettleException
Object type was specified. Only information from…
Error message
Object type {objectType} was specified. Only information from transformations, jobs and databases can be retrieved at this time. What it means
KettleDatabaseRepository's object-information retrieval only supports transformations, jobs and databases; the default branch of the type switch throws a KettleException when any other RepositoryObjectType (slave server, cluster schema, partition schema, etc.) is requested. It is an explicit capability limit of getObjectInformation for this repository type.
Solutions
- Restrict getObjectInformation calls to TRANSFORMATION, JOB and DATABASE object types and handle others separately.
- Use the dedicated accessors for other types (getSlaveServer, getClusterSchema, getPartitionSchema) instead.
- Check objectType.getTypeDescription() and branch before calling; return a not-supported result gracefully.
Example fix
// before
RepositoryObject obj = repo.getObjectInformation(id, objectType);
// after
if (objectType != RepositoryObjectType.TRANSFORMATION
&& objectType != RepositoryObjectType.JOB
&& objectType != RepositoryObjectType.DATABASE) {
return null; // use type-specific getters instead
}
RepositoryObject obj = repo.getObjectInformation(id, objectType); Defensive patterns
Strategy: type-guard
Validate before calling
boolean infoSupported = objectType == RepositoryObjectType.TRANSFORMATION
|| objectType == RepositoryObjectType.JOB || objectType == RepositoryObjectType.DATABASE;
if (!infoSupported) { return null; /* or use type-specific getter */ } Type guard
boolean supportsObjectInfo(RepositoryObjectType t) {
return t == RepositoryObjectType.TRANSFORMATION || t == RepositoryObjectType.JOB
|| t == RepositoryObjectType.DATABASE;
} Try / catch
try {
return repo.getObjectInformation(id, objectType);
} catch (KettleException e) {
if (e.getMessage() != null && e.getMessage().contains("Only information from transformations, jobs and databases")) {
return null; // fall back to type-specific getter
} else { throw e; }
} Prevention
- Restrict getObjectInformation to transformation/job/database types.
- Route other object kinds to their dedicated repository getters.
- Handle the default branch in generic browser code instead of letting it throw.
When it happens
Trigger: Calling repo.getObjectInformation(objectId, objectType) with objectType such as RepositoryObjectType.CLUSTER_SCHEMA or SLAVE_SERVER, or with a guessed/default object type.
Common situations: Generic repository browsers that request object info for any tree node; scripts that resolve object types from file extensions and hit non-T/J/D types; plugin code assuming full getObjectInformation coverage.
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 [" +…
- unknown type [" + typeToUpdate + "]
- We can't save the element with type
- We can't verify the existance of repository element type
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b7a2de4734ec6ba0.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepository.java:2024
case JOB: {
RowMetaAndData row = jobDelegate.getJob( objectId );
name = row.getString( KettleDatabaseRepository.FIELD_JOB_NAME, null );
description = row.getString( KettleDatabaseRepository.FIELD_JOB_DESCRIPTION, null );
modifiedUser = row.getString( KettleDatabaseRepository.FIELD_JOB_MODIFIED_USER, "-" );
modifiedDate = row.getDate( KettleDatabaseRepository.FIELD_JOB_MODIFIED_DATE, null );
dirId = row.getInteger( KettleDatabaseRepository.FIELD_JOB_ID_DIRECTORY, 0 );
break;
}
//PDI-15871 Return available information for DATABASE
case DATABASE: {
RowMetaAndData row = databaseDelegate.getDatabase( objectId );
name = row.getString( KettleDatabaseRepository.FIELD_DATABASE_NAME, null );
return new RepositoryObject(
objectId, name, null, null, null, objectType, null, false );
}
default:
throw new KettleException( "Object type "
+ objectType.getTypeDescription()
+ " was specified. Only information from transformations, jobs and databases can be retrieved at this time." );
// Nothing matches, return null
}
boolean isDeleted = ( name == null );
directory = loadRepositoryDirectoryTree().findDirectory( new LongObjectId( dirId ) );
return new RepositoryObject(
objectId, name, directory, modifiedUser, modifiedDate, objectType, description, isDeleted );
} catch ( Exception e ) {
throw new KettleException( "Unable to get object information for object with id=" + objectId, e );
}
}
public JobMeta loadJob( ObjectId idJob, String versionLabel ) throws KettleException {
RepositoryObject jobInfo = getObjectInformation( idJob, RepositoryObjectType.JOB );
return loadJob( jobInfo.getName(), jobInfo.getRepositoryDirectory(), null, versionLabel );
}View on GitHub (pinned to f3058517a1)