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

FixedInputMeta.saveRep wraps repository write failures while persisting the step's filename, layout, and per-field definitions in a KettleException with this message plus id_step. The cause carries the underlying repository error.

Solutions

  1. Read the chained cause to identify connection vs permission vs data errors
  2. Confirm the repository user has INSERT/UPDATE rights and the repository is online/writable
  3. Reload the transformation from the repository before re-saving to reset in-memory metadata
  4. Retry the save after reconnecting; if persistent, save locally as .ktr and diagnose the repository

Example fix

// before
fieldDefinition[i].getLength(); // NPE if fieldDefinition was never allocated
// after
if ( fieldDefinition != null && fieldDefinition[i] != null ) {
  rep.saveStepAttribute( id_transformation, id_step, i, "field_length", fieldDefinition[i].getLength() );
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before save
if ( meta.getFieldDefinition() == null || meta.getFieldDefinition().length == 0 ) {
  throw new IllegalStateException( "FixedInput has no field definitions to save" );
}

Try / catch

try {
  transMeta.saveRep( rep, metaStore, transName );
} catch ( KettleException e ) {
  logError( "Save failed (id_step=" + e.getMessage() + "): " + e.getCause(), e );
}

Prevention

When it happens

Trigger: saveRep when any saveStepAttribute call throws — connection loss, permissions, constraint violation, or null fieldDefinition entries (allocate not called with the right size).

Common situations: Saving a transformation to a database repository that has become unavailable or read-only; insufficient privileges; a step whose field list was corrupted in memory after a failed XML load.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fixedinput/FixedInputMeta.java:246

      for ( int i = 0; i < fieldDefinition.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldDefinition[i].getName() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_type",
          ValueMetaFactory.getValueMetaName( fieldDefinition[i].getType() ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_format", fieldDefinition[i].getFormat() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_trim_type", ValueMetaString
          .getTrimTypeCode( fieldDefinition[i].getTrimType() ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_currency", fieldDefinition[i].getCurrency() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_decimal", fieldDefinition[i].getDecimal() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_group", fieldDefinition[i].getGrouping() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_width", fieldDefinition[i].getWidth() );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_length", fieldDefinition[i].getLength() );
        rep
          .saveStepAttribute( id_transformation, id_step, i, "field_precision", fieldDefinition[i]
            .getPrecision() );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + 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 {
    try {
      for ( int i = 0; i < fieldDefinition.length; i++ ) {
        FixedFileInputField field = fieldDefinition[i];

        ValueMetaInterface valueMeta = ValueMetaFactory.createValueMeta( field.getName(), field.getType() );
        valueMeta.setConversionMask( field.getFormat() );
        valueMeta.setTrimType( field.getTrimType() );
        valueMeta.setLength( field.getLength() );
        valueMeta.setPrecision( field.getPrecision() );
        valueMeta.setConversionMask( field.getFormat() );
        valueMeta.setDecimalSymbol( field.getDecimal() );
        valueMeta.setGroupingSymbol( field.getGrouping() );

View on GitHub (pinned to f3058517a1)