pentaho/pentaho-kettle · error · KettleException

Unable to save step information to the repository for…

Error message

Unable to save step information to the repository for id_step=

What it means

WriteToLogMeta.saveRep() persists step settings (limitRowsNumber, logmessage, per-row field_name attributes) via rep.saveStepAttribute(). Any exception during these writes is wrapped in a KettleException with 'Unable to save step information to the repository for id_step=' plus the step id. It indicates the step's configuration could not be committed to the repository.

Solutions

  1. Check the wrapped cause for the concrete JDBC error (connection, constraint, permissions) and fix that first.
  2. Confirm the repository user has INSERT/UPDATE rights on r_step_attribute.
  3. Reconnect to the repository and retry saving the transformation.
  4. Shorten logmessage/field values if a length constraint was violated; then re-save.

Example fix

// before: saving with a read-only account fails
// after: connect with an account holding write privileges on repository tables
Repository rep = KettleDatabaseRepository.connect(...); // user with INSERT/UPDATE
Defensive patterns

Strategy: try-catch

Validate before calling

if (!repository.isConnected()) {
  throw new KettleException("Repository not connected before saveRep");
}
if (meta.getLogMessage() != null && meta.getLogMessage().length() > 4000) {
  throw new KettleException("logmessage exceeds column capacity");
}

Try / catch

try {
  meta.saveRep(repository, metaStore, idTransformation, idStep);
} catch (KettleException e) {
  log.error("Repository save failed: " + e.getCause(), e);
  // check write permissions/connection, then retry
}

Prevention

When it happens

Trigger: Calling saveRep() when the repository write fails: connection lost, constraint violation, read-only user, or oversized logmessage/field values — any Exception in the try block is wrapped at this line.

Common situations: Read-only repository credentials; repository database disk full or table locked; saving a transformation whose step id no longer exists (stale object); long field names exceeding column width.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/writetolog/WriteToLogMeta.java:291

      }
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step information from the repository", e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "loglevel", loglevel );
      rep.saveStepAttribute( id_transformation, id_step, "displayHeader", displayHeader );
      rep.saveStepAttribute( id_transformation, id_step, "limitRows", limitRows );
      rep.saveStepAttribute( id_transformation, id_step, "limitRowsNumber", limitRowsNumber );
      rep.saveStepAttribute( id_transformation, id_step, "logmessage", logmessage );
      for ( int i = 0; i < fieldName.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldName[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
    }
  }

  @Override
  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 ( prev == null || prev.size() == 0 ) {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_WARNING, BaseMessages.getString(
          PKG, "WriteToLogMeta.CheckResult.NotReceivingFields" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "WriteToLogMeta.CheckResult.StepRecevingData", prev.size() + "" ), stepMeta );
      remarks.add( cr );

View on GitHub (pinned to f3058517a1)