pentaho/pentaho-kettle · error · KettleException

Unexpected error reading step information from the…

Error message

Unexpected error reading step information from the repository

What it means

FixedInputMeta.readRep wraps any exception while restoring the fixed-file input step's settings and field definitions from the repository in a KettleException with this message. The original repository error is chained as cause.

Solutions

  1. Check the chained cause exception for the exact failing attribute
  2. Inspect r_step_attribute rows for this id_step and fix or remove non-numeric field_length/field_precision values
  3. Recreate the step definition in Spoon and re-save it
  4. Verify repository version compatibility between the writer and reader PDI versions

Example fix

// before
field.setLength( (int) rep.getStepAttributeInteger( id_step, i, "field_length" ) ); // throws on corrupt value
// after
long len = rep.getStepAttributeInteger( id_step, i, "field_length" );
field.setLength( len > 0 ? (int) len : -1 );
Defensive patterns

Strategy: try-catch

Validate before calling

// sanity check before load
if ( rep != null && rep.isConnected() ) { transMeta = new TransMeta( rep, metaStore, transName, null ); }

Try / catch

try {
  stepMeta.getStepMetaInterface().readRep( rep, metaStore, idStep, databases );
} catch ( KettleException e ) {
  logError( "readRep failed: " + e.getCause(), e );
}

Prevention

When it happens

Trigger: readRep iterating nrfields field rows when getStepAttributeInteger/String throws or a value cannot be converted (e.g., non-numeric field_length/field_precision) for this id_step.

Common situations: Repository rows for the step manually modified or written by an incompatible PDI version; corrupted attribute values in r_step_attribute; repository connectivity problems while loading a transformation.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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

Appendix: source

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

      for ( int i = 0; i < nrfields; i++ ) {
        FixedFileInputField field = new FixedFileInputField();

        field.setName( rep.getStepAttributeString( id_step, i, "field_name" ) );
        field.setType( ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) ) );
        field.setFormat( rep.getStepAttributeString( id_step, i, "field_format" ) );
        field.setTrimType( ValueMetaString
          .getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "field_trim_type" ) ) );
        field.setCurrency( rep.getStepAttributeString( id_step, i, "field_currency" ) );
        field.setDecimal( rep.getStepAttributeString( id_step, i, "field_decimal" ) );
        field.setGrouping( rep.getStepAttributeString( id_step, i, "field_group" ) );
        field.setWidth( (int) rep.getStepAttributeInteger( id_step, i, "field_width" ) );
        field.setLength( (int) rep.getStepAttributeInteger( id_step, i, "field_length" ) );
        field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, "field_precision" ) );

        fieldDefinition[i] = field;
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step information from the repository", e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "filename", filename );
      rep.saveStepAttribute( id_transformation, id_step, "line_width", lineWidth );
      rep.saveStepAttribute( id_transformation, id_step, "buffer_size", bufferSize );
      rep.saveStepAttribute( id_transformation, id_step, "header", headerPresent );
      rep.saveStepAttribute( id_transformation, id_step, "lazy_conversion", lazyConversionActive );
      rep.saveStepAttribute( id_transformation, id_step, "line_feed", lineFeedPresent );
      rep.saveStepAttribute( id_transformation, id_step, "parallel", runningInParallel );
      rep.saveStepAttribute( id_transformation, id_step, "file_type", getFileTypeCode( fileType ) );
      rep.saveStepAttribute( id_transformation, id_step, "encoding", encoding );
      rep.saveStepAttribute( id_transformation, id_step, "add_to_result_filenames", isaddresult );

      for ( int i = 0; i < fieldDefinition.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldDefinition[i].getName() );

View on GitHub (pinned to f3058517a1)