pentaho/pentaho-kettle · error · KettleException
MergeJoinMeta.Exception.UnexpectedErrorReadingStepInfo
MergeJoinMeta.Exception.UnexpectedErrorReadingStepInfo
Error message
MergeJoinMeta.Exception.UnexpectedErrorReadingStepInfo
What it means
Thrown by MergeJoinMeta.readRep when loading the Merge Join step definition from the Kettle repository fails with an unexpected Exception. It reads step1, step2 and join_type step attributes for the given id_step and wraps any failure in a KettleException with this message.
Solutions
- Check the wrapped cause (KettleException.getCause()) for the underlying repository error.
- Verify repository connectivity (database up, credentials valid) and retry loading the transformation.
- Query R_STEP_ATTRIBUTE for the id_step to confirm step1/step2/join_type rows exist; re-save the step in Spoon to recreate them.
- If the repository schema is inconsistent, run the repository upgrade/repair tooling for your Kettle version.
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the step's attributes exist in the repository before load // SELECT COUNT(*) FROM R_STEP_ATTRIBUTE WHERE ID_STEP = ? -- expect > 0
Try / catch
try {
TransMeta tm = new TransMeta(repository, transName, directory);
} catch (KettleException e) {
log.error("Repository read failed for merge join step: " + e.getCause(), e);
} Prevention
- Check repository DB connectivity before loading transformations in batch jobs.
- Avoid deleting R_STEP_ATTRIBUTE rows directly; edit steps via Spoon.
- Keep the repository schema upgraded to match your Kettle version.
- Back up the repository database regularly.
When it happens
Trigger: Calling readRep (via TransMeta loading from a repository) when the repository query for step attributes of id_step throws — e.g. missing rows in R_STEP_ATTRIBUTE, repository connection failures, or a corrupted step record.
Common situations: Loading a transformation from a repository where its step attribute rows were deleted or never saved; database connectivity problems mid-load; repository schema version mismatch.
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
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
- AggregateRowsMeta.Exception.UnableToSaveStepInfo
- CubeInputMeta.Exception.UnableToSaveStepInfo
- CubeOutputMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/8433a219598f74de.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mergejoin/MergeJoinMeta.java:236
try {
int nrKeys1 = rep.countNrStepAttributes( id_step, "keys_1" );
int nrKeys2 = rep.countNrStepAttributes( id_step, "keys_2" );
allocate( nrKeys1, nrKeys2 );
for ( int i = 0; i < nrKeys1; i++ ) {
keyFields1[i] = rep.getStepAttributeString( id_step, i, "keys_1" );
}
for ( int i = 0; i < nrKeys2; i++ ) {
keyFields2[i] = rep.getStepAttributeString( id_step, i, "keys_2" );
}
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
infoStreams.get( 0 ).setSubject( rep.getStepAttributeString( id_step, "step1" ) );
infoStreams.get( 1 ).setSubject( rep.getStepAttributeString( id_step, "step2" ) );
joinType = rep.getStepAttributeString( id_step, "join_type" );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "MergeJoinMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
}
}
@Override
public void searchInfoAndTargetSteps( List<StepMeta> steps ) {
List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
for ( StreamInterface stream : infoStreams ) {
stream.setStepMeta( StepMeta.findStep( steps, (String) stream.getSubject() ) );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
for ( int i = 0; i < keyFields1.length; i++ ) {
rep.saveStepAttribute( id_transformation, id_step, i, "keys_1", keyFields1[i] );
}
View on GitHub (pinned to f3058517a1)