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

GetVariableMeta.readRep reads the step's field definitions from repository attributes and wraps any exception in a KettleException with the literal message 'Unexpected error reading step information from the repository'. Each field's type is normalized (TYPE_NONE -> TYPE_STRING), but repository read failures or bad stored values trigger this wrapper.

Solutions

  1. Check e.getCause() for the actual repository error (connection, conversion, not-found).
  2. Reconnect to the repository and reload the transformation.
  3. Re-open and re-save the step in Spoon to rewrite its attributes.
  4. Align repository schema version with the Pentaho client.

Example fix

// before
try {
  transMeta.readRep( rep, metaStore, id_transformation, null );
} catch ( KettleException e ) {
  throw e;
}
// after
try {
  transMeta.readRep( rep, metaStore, id_transformation, null );
} catch ( KettleException e ) {
  logError( "Read failed: " + e.getCause() + " - reloading repository meta" );
  rep.disconnect();
  rep.connect( env, user, pass );
  transMeta.readRep( rep, metaStore, id_transformation, null );
}
Defensive patterns

Strategy: try-catch

Validate before calling

if ( rep == null || !rep.isConnected() ) {
  throw new IllegalStateException( "Repository not connected before readRep" );
}

Try / catch

try {
  transMeta.readRep( rep, metaStore, idTrans, null );
} catch ( KettleException e ) {
  logError( "Unexpected read error: " + e.getCause() + " - reconnect and retry" );
}

Prevention

When it happens

Trigger: readRep throws while calling rep.getStepAttributeString/getStepAttributeInteger over the numbered field rows — repository connection failure, missing id_step, or a stored attribute value that fails numeric/boolean conversion.

Common situations: Repository down or credentials expired when loading a transformation; repository schema drifted from client version; orphaned step id after a failed save left partial data.

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/03e5c014df70af2c. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getvariable/GetVariableMeta.java:256

        fieldDefinitions[i].setFieldFormat( rep.getStepAttributeString( id_step, i, "field_format" ) );
        fieldDefinitions[i].setCurrency( rep.getStepAttributeString( id_step, i, "field_currency" ) );
        fieldDefinitions[i].setDecimal( rep.getStepAttributeString( id_step, i, "field_decimal" ) );
        fieldDefinitions[i].setGroup( rep.getStepAttributeString( id_step, i, "field_group" ) );
        fieldDefinitions[i].setFieldLength( (int) rep.getStepAttributeInteger( id_step, i, "field_length" ) );
        fieldDefinitions[i].setFieldPrecision( (int) rep.getStepAttributeInteger( id_step, i, "field_precision" ) );
        fieldDefinitions[i].setTrimType(
          ValueMetaString.getTrimTypeByCode( rep.getStepAttributeString( id_step, i, "field_trim_type" ) ) );

        // Backward compatibility
        //
        int fieldType = fieldDefinitions[i].getFieldType();
        if ( fieldType == ValueMetaInterface.TYPE_NONE ) {
          fieldDefinitions[i].setFieldType( ValueMetaInterface.TYPE_STRING );
        }
      }

    } 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 {

      for ( int i = 0; i < fieldDefinitions.length; i++ ) {
        String fieldName = fieldDefinitions[i].getFieldName();
        if ( fieldName != null && fieldName.length() != 0 ) {
          rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldName );
          rep.saveStepAttribute( id_transformation, id_step, i, "field_variable", fieldDefinitions[i]
              .getVariableString() );
          rep.saveStepAttribute( id_transformation, id_step, i, "field_type",
            ValueMetaFactory.getValueMetaName( fieldDefinitions[i].getFieldType() ) );
          rep.saveStepAttribute( id_transformation, id_step, i, "field_format", fieldDefinitions[i].getFieldFormat() );
          rep.saveStepAttribute( id_transformation, id_step, i, "field_currency", fieldDefinitions[i].getCurrency() );

View on GitHub (pinned to f3058517a1)