pentaho/pentaho-kettle · error · KettleException

ExecSQLMeta.Exception.UnableToSaveStepInfo

ExecSQLMeta.Exception.UnableToSaveStepInfo

Error message

ExecSQLMeta.Exception.UnableToSaveStepInfo" + id_step

What it means

Thrown by ExecSQLMeta.saveRep when persisting the step's attributes to the repository fails, including the per-index arg_name writes for each SQL argument. The KettleException message concatenates the message key with id_step. Saving the transformation to the repository aborts.

Solutions

  1. Inspect the wrapped cause for the underlying repository error
  2. Verify write permissions on the repository account
  3. Reconnect the repository and retry the save
  4. Check DB tablespace/disk capacity (long SQL bodies are stored as attributes)
  5. Save a local .ktr copy to avoid losing work while repository issues persist

Example fix

// before
transMeta.saveRep(rep, metaStore, id_transformation); // may throw for ExecSQL step
// after
try {
  transMeta.saveRep(rep, metaStore, id_transformation);
} catch (KettleException e) {
  logError("Repository save failed: " + e.getCause());
  rep.disconnect(); rep.connect();
  transMeta.saveRep(rep, metaStore, id_transformation);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before save
if (!rep.isConnected()) rep.connect();
if (execSqlMeta.getArguments() != null) {
  for (String a : execSqlMeta.getArguments()) { if (a == null) throw new IllegalStateException("null argument name"); }
}

Try / catch

try { transMeta.saveRep(rep, metaStore, idTransformation); } catch (KettleException e) { logError("ExecSQL save failed: " + e.getCause()); rep.disconnect(); rep.connect(); transMeta.saveRep(rep, metaStore, idTransformation); }

Prevention

When it happens

Trigger: Calling saveRep when repository writes fail: dropped DB connection, read-only repository account, constraint or size violations on saved attribute values, locked R_STEP_ATTRIBUTE rows from concurrent saves.

Common situations: Saving from Spoon with a stale repository session; repository database restarted mid-save; insufficient grants after an account migration; tablespace full on large SQL text attributes.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sql/ExecSQLMeta.java:377

      rep.saveStepAttribute( id_transformation, id_step, "single_statement", singleStatement );
      rep.saveStepAttribute( id_transformation, id_step, "replace_variables", replaceVariables );
      rep.saveStepAttribute( id_transformation, id_step, "quoteString", quoteString );
      rep.saveStepAttribute( id_transformation, id_step, "set_params", setParams );
      rep.saveStepAttribute( id_transformation, id_step, "insert_field", insertField );
      rep.saveStepAttribute( id_transformation, id_step, "update_field", updateField );
      rep.saveStepAttribute( id_transformation, id_step, "delete_field", deleteField );
      rep.saveStepAttribute( id_transformation, id_step, "read_field", readField );

      // Also, save the step-database relationship!
      if ( databaseMeta != null ) {
        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
      }

      for ( int i = 0; i < arguments.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "arg_name", arguments[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "ExecSQLMeta.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;

    if ( databaseMeta != null ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "ExecSQLMeta.CheckResult.ConnectionExists" ), stepMeta );
      remarks.add( cr );

      Database db = new Database( loggingObject, databaseMeta );
      db.shareVariablesWith( transMeta );
      databases = new Database[] { db }; // keep track of it for

View on GitHub (pinned to f3058517a1)