pentaho/pentaho-kettle · error · KettleException

DeleteMeta.Exception.UnableToSaveStepInfo

DeleteMeta.Exception.UnableToSaveStepInfo

Error message

DeleteMeta.Exception.UnableToSaveStepInfo

What it means

DeleteMeta.saveRep persists the step configuration (including the step-database relationship via rep.insertStepDatabase) to the repository. Any exception during persistence is wrapped in a KettleException with this message and the step's ObjectId appended. Metadata is not saved, so the transformation would be stored incomplete.

Solutions

  1. Read the cause chain for the repository SQL/connection error.
  2. Confirm the repository is writable and the DB user has INSERT/UPDATE privileges on repository tables.
  3. Ensure the referenced database connection is saved (has an ObjectId) before saving the step — save it as a shared connection first.
  4. Retry saving after restoring repository connectivity; check for locks or concurrent modification.

Example fix

// before
databaseMeta = new DatabaseMeta(...); // never saved, ObjectId null
// after
rep.save(databaseMeta, null, metaStore); // persist connection first, then saveRep
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-save checks
assert rep.isConnected();
assert databaseMeta.getObjectId() != null; // connection already persisted

Try / catch

try { deleteMeta.saveRep(rep, metaStore, transId, stepId); } catch (KettleException e) {
  log.error("Save of Delete step {} failed: {}", stepId, e.getCause(), e);
  throw e; // do not continue with partially saved metadata
}

Prevention

When it happens

Trigger: saveRep performs repository writes (saveStepAttributes, insertStepDatabase) and any of them throws — repository connection lost, read-only repository, constraint violation, or databaseMeta set but its ObjectId is null/unpersisted.

Common situations: Repository database is read-only or out of space; connection dropped while saving; shared database connection object not yet saved so insertStepDatabase gets a null ObjectId; concurrent edits by another user.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java:335

    try {
      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, TAG_ID_CONNECTION, databaseMeta );
      rep.saveStepAttribute( id_transformation, id_step, TAG_COMMIT, commitSize );
      rep.saveStepAttribute( id_transformation, id_step, TAG_SCHEMA, schemaName );
      rep.saveStepAttribute( id_transformation, id_step, TAG_TABLE, tableName );

      for ( int i = 0; i < keyFields.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_NAME, keyFields[i].getKeyStream() );
        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_FIELD, keyFields[i].getKeyLookup() );
        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_CONDITION, keyFields[i].getKeyCondition() );
        rep.saveStepAttribute( id_transformation, id_step, i, TAG_KEY_NAME2, keyFields[i].getKeyStream2() );
      }

      // Also, save the step-database relationship!
      if ( databaseMeta != null ) {
        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "DeleteMeta.Exception.UnableToSaveStepInfo" )
              + id_step, e );
    }
  }

  @Override
  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
                         VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    // Default: nothing changes to rowMeta
  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                     RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                     Repository repository, IMetaStore metaStore ) {
    CheckResult cr;
    String error_message = "";

    if ( databaseMeta != null ) {
      Database db = new Database( loggingObject, databaseMeta );

View on GitHub (pinned to f3058517a1)