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=<id_step>

What it means

AddXMLMeta.saveRep persists step settings via rep.saveStepAttribute. If any repository write fails, the exception is wrapped in KettleException with the message 'Unable to save step information to the repository for id_step=<id_step>'. The cause (KettleDatabaseException etc.) holds the real error.

Solutions

  1. Read the wrapped cause (ke.getCause()) for the SQL/repository error
  2. Verify the repository database is writable and reachable (check credentials, disk space)
  3. Retry saving; if lock contention, close other Spoon sessions holding the transformation
  4. Check r_step_attribute table integrity/constraints if errors persist

Example fix

// before
KettleDatabaseException dbe; // silently ignored
// after
try { transMeta.saveRep(repo, metaStore, transId); } catch (KettleException ke) { logError("Save failed", ke.getCause()); }
Defensive patterns

Strategy: try-catch

Validate before calling

if (repository.isReadOnly != null && repository.isReadOnly()) failFast("Repository is read-only; save will fail");

Try / catch

try { meta.saveRep(repo, metaStore, transId, stepId); }
catch (KettleException e) {
  logError("Save failed for id_step=" + stepId, e.getCause());
  // retry or fall back to local file export
}

Prevention

When it happens

Trigger: Saving a transformation containing an AddXML step where the repository insert/update into step attribute tables fails — DB down, lock timeout, constraint violation, or read-only connection.

Common situations: Repository database in read-only mode or out of disk; deadlock/lock contention from concurrent Spoon sessions; expired DB credentials mid-session.

Related errors


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

Appendix: source

Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/addxml/AddXMLMeta.java:332

      for ( int i = 0; i < outputFields.length; i++ ) {
        XMLField field = outputFields[i];

        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", field.getFieldName() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_element", field.getElementName() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type", field.getTypeDesc() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_format", field.getFormat() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_currency", field.getCurrencySymbol() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_decimal", field.getDecimalSymbol() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_group", field.getGroupingSymbol() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_nullif", field.getNullString() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_length", field.getLength() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_precision", field.getPrecision() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_attribute", field.isAttribute() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_attributeName", field.getAttributeParentName() );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + 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;
    // TODO - add checks for empty fieldnames

    // Check output fields
    if ( prev != null && prev.size() > 0 ) {
      cr =
          new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString( PKG,
              "AddXMLMeta.CheckResult.FieldsReceived", "" + prev.size() ), stepMeta );
      remarks.add( cr );

      String error_message = "";

View on GitHub (pinned to f3058517a1)