pentaho/pentaho-kettle · error · KettleException
Condition with id_condition=
Error message
Condition with id_condition={id_condition} could not be found in the repository What it means
Generic KettleException thrown by loadCondition when the given id_condition does not correspond to any row the repository condition lookup returns. The load loop expects a row set; if the first read has no data, the condition cannot be reconstructed. Typically indicates a dangling reference or a deleted condition record.
Solutions
- Verify the id exists with a direct query (SELECT * FROM R_CONDITION WHERE ID_CONDITION = ?)
- Re-save the transformation/job to regenerate missing condition rows
- Restore the condition rows from a repository backup
- Catch KettleException at the load site and treat the condition as missing/default rather than aborting the whole load
Example fix
// before
Condition c = conditionDelegate.loadCondition(savedId); // throws if deleted
// after
Condition c;
try {
c = conditionDelegate.loadCondition(savedId);
} catch (KettleException e) {
c = new Condition(); // default empty condition
} Defensive patterns
Strategy: try-catch
Validate before calling
RowMetaAndData row = connectionDelegate.getCondition(id); if (row == null || row.isEmpty()) { /* treat as missing before calling loadCondition */ } Type guard
boolean conditionExists = id != null && repository.connectionDelegate.getCondition(id) != null;
Try / catch
try { c = delegate.loadCondition(id); } catch (KettleException e) { c = defaultCondition(); log.warn("Condition {} missing, using default", id); } Prevention
- Never persist stale ObjectIds across repository restores
- Restore full backups including R_CONDITION
- Validate referential integrity after manual DB cleanup
- Default missing conditions instead of failing whole loads
When it happens
Trigger: loadCondition(id) invoked with an id that was deleted from R_CONDITION, a stale ObjectId stored in a step/job entry attribute, or a corrupt repository row.
Common situations: Loading old transformations after manual table cleanup, partial repository imports/exports, or upgrading across repository versions where condition rows were dropped.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- Error loading condition from the repository
- Error saving condition to the repository.
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AccessInputMeta.Exception.ErrorReadingRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/50fee11159086171.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryConditionDelegate.java:87
if ( subids.length == 0 ) {
condition.setLeftValuename( r.getString( "LEFT_NAME", null ) );
condition.setFunction( Condition.getFunction( r.getString( "CONDITION_FUNCTION", null ) ) );
condition.setRightValuename( r.getString( "RIGHT_NAME", null ) );
long id_value = r.getInteger( "ID_VALUE_RIGHT", -1L );
if ( id_value > 0 ) {
ValueMetaAndData v = repository.loadValueMetaAndData( new LongObjectId( id_value ) );
condition.setRightExact( v );
}
} else {
for ( int i = 0; i < subids.length; i++ ) {
condition.addCondition( loadCondition( subids[i] ) );
}
}
return condition;
} else {
throw new KettleException( "Condition with id_condition="
+ id_condition + " could not be found in the repository" );
}
} catch ( KettleException dbe ) {
throw new KettleException(
"Error loading condition from the repository (id_condition=" + id_condition + ")", dbe );
}
}
public ObjectId saveCondition( Condition condition ) throws KettleException {
return saveCondition( condition, null );
}
public ObjectId saveCondition( Condition condition, ObjectId id_condition_parent ) throws KettleException {
try {
condition.setObjectId( insertCondition( id_condition_parent, condition ) );
for ( int i = 0; i < condition.nrConditions(); i++ ) {
Condition subc = condition.getCondition( i );
repository.saveCondition( subc, condition.getObjectId() );View on GitHub (pinned to f3058517a1)