pentaho/pentaho-kettle · error · KettleException

DBProcMeta.Exception.UnableToSaveStepInfo

DBProcMeta.Exception.UnableToSaveStepInfo

Error message

DBProcMeta.Exception.UnableToSaveStepInfo

What it means

DBProcMeta.saveRep writes the DB Procedure step configuration (procedure name, arguments, result, connection) to the repository and links the step-database relationship. Any repository write exception is wrapped in this localized KettleException with id_step appended, aborting the save.

Solutions

  1. Read the chained cause for the underlying repository error and fix connectivity/permissions first.
  2. Reconnect to the repository (or restart Spoon) and retry the save.
  3. Ensure the step's database connection exists and is saved; re-create the connection if its object id is stale.
  4. Confirm the repository schema version matches the engine and run the upgrade tool if not.

Example fix

// no code change; repair workflow
// 1. Repository -> Reconnect  2. Re-save the DB connection  3. File -> Save
Defensive patterns

Strategy: retry

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("Repository not connected");
if (meta.getDatabase(meta) != null && meta.getDatabase(meta).getObjectId() == null)
  throw new IllegalStateException("Step references an unsaved database connection");

Type guard

boolean readyToSave(Repository rep, DatabaseMeta db){
  return rep.isConnected() && (db == null || db.getObjectId() != null);
}

Try / catch

try { meta.saveRep(rep, metaStore, idTransformation, idStep); }
catch (KettleException e) {
  logError("DBProc repository save failed: " + e.getCause(), e);
  // reconnect and retry once
  rep.disconnect(); rep.connect(user, pass);
  meta.saveRep(rep, metaStore, idTransformation, idStep);
}

Prevention

When it happens

Trigger: Saving a transformation to a repository when saveStepAttribute or insertStepDatabase fails — lost DB connection, constraint violation, read-only repository, or null/invalid database metadata causing insertStepDatabase to fail.

Common situations: Repository DB outage or timeout; repository user lacking write permissions; referenced connection deleted so database.getObjectId() is stale; long-edited transformation with a stale DB session.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/dbproc/DBProcMeta.java:382

      for ( int i = 0; i < argument.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_name", argument[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_direction", argumentDirection[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_type",
          ValueMetaFactory.getValueMetaName( argumentType[i] ) );
      }

      rep.saveStepAttribute( id_transformation, id_step, "result_name", resultName );
      rep.saveStepAttribute( id_transformation, id_step, "result_type",
        ValueMetaFactory.getValueMetaName( resultType ) );
      rep.saveStepAttribute( id_transformation, id_step, "auto_commit", autoCommit );

      // Also, save the step-database relationship!
      if ( database != null ) {
        rep.insertStepDatabase( id_transformation, id_step, database.getObjectId() );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "DBProcMeta.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 ) {
    CheckResult cr;
    String error_message = "";

    if ( database != null ) {
      Database db = new Database( transMeta, database );
      try {
        db.connect();

        // Look up fields in the input stream <prev>
        if ( prev != null && prev.size() > 0 ) {
          boolean first = true;

View on GitHub (pinned to f3058517a1)