pentaho/pentaho-kettle · error · KettleException

MergeJoinMeta.Exception.UnableToSaveStepInfo

MergeJoinMeta.Exception.UnableToSaveStepInfo

Error message

MergeJoinMeta.Exception.UnableToSaveStepInfo

What it means

Thrown by MergeJoinMeta.saveRep when persisting the Merge Join step attributes (step1, step2, join_type) to the Kettle repository fails. Any Exception from rep.saveStepAttribute is wrapped in a KettleException with this message plus the id_step appended.

Solutions

  1. Check the wrapped cause for the underlying database error and fix connectivity/permission issues.
  2. Confirm the repository user has INSERT/UPDATE rights on R_STEP_ATTRIBUTE.
  3. Retry saving after the database recovers; if a transaction is stuck, resolve locks on the repository tables.
  4. As a workaround, export the transformation to a .ktr file instead of saving to the repository.
Defensive patterns

Strategy: retry

Validate before calling

// Pre-check write access to the repository
if (!repository.isConnected() || repository.isReadOnly()) {
  throw new IllegalStateException("Repository not writable");
}

Try / catch

try {
  transMeta.saveRep(repository, directory, transName, description);
} catch (KettleException e) {
  // inspect cause (DB connectivity/permissions) and retry once recovered
}

Prevention

When it happens

Trigger: Saving a transformation to a repository when the saveStepAttribute insert/update for id_step throws — e.g. database connection loss, transaction failure, read-only repository, or exceeding column length limits.

Common situations: Repository database down or network blip while saving; repository user lacks write permission; repository in read-only/maintenance mode; very long join type or step names overflowing DB columns.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/196abb8aea319859. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mergejoin/MergeJoinMeta.java:265

  }

  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] );
      }

      for ( int i = 0; i < keyFields2.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "keys_2", keyFields2[i] );
      }

      List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();

      rep.saveStepAttribute( id_transformation, id_step, "step1", infoStreams.get( 0 ).getStepname() );
      rep.saveStepAttribute( id_transformation, id_step, "step2", infoStreams.get( 1 ).getStepname() );
      rep.saveStepAttribute( id_transformation, id_step, "join_type", getJoinType() );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "MergeJoinMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }
  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                     RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                     Repository repository, IMetaStore metaStore ) {
    /*
     * @todo Need to check for the following: 1) Join type must be one of INNER / LEFT OUTER / RIGHT OUTER / FULL OUTER
     * 2) Number of input streams must be two (for now at least) 3) The field names of input streams must be unique
     */
    CheckResult cr =
      new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
        PKG, "MergeJoinMeta.CheckResult.StepNotVerified" ), stepMeta );
    remarks.add( cr );
  }

  @Override

View on GitHub (pinned to f3058517a1)