pentaho/pentaho-kettle · error · KettleException

GetPreviousRowFieldMeta.Exception.UnexpectedErrorInReadingSt…

Error message

GetPreviousRowFieldMeta.Exception.UnexpectedErrorInReadingStepInfo

What it means

GetPreviousRowFieldMeta.readRep() loads the step's field configuration from the repository. If reading step attributes (counting/reading in_stream_name/out_stream_name entries) throws, the exception is wrapped in a KettleException with this localized message. It indicates a repository-level failure while deserializing step metadata.

Solutions

  1. Check repository connectivity and retry loading the transformation
  2. Inspect the cause for the underlying SQL error and fix schema/permissions
  3. Re-save the step from Spoon to rewrite its attributes
  4. Restore or repair the repository's step attribute tables from backup
Defensive patterns

Strategy: try-catch

Validate before calling

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

Try / catch

try { meta.readRep(rep, metaStore, id_step, databases); } catch (KettleException e) { log.error("readRep failed: " + e.getCause(), e); }

Prevention

When it happens

Trigger: Opening a transformation from a repository when the step attribute rows are missing/corrupt or the repository query fails (connection dropped, schema mismatch, bad id_step).

Common situations: Repository schema drift after an upgrade; network interruption mid-load; orphaned step attributes after a partial delete; permissions issues on the repository user.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


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

Appendix: source

Thrown at plugins/get-previous-row-field/core/src/main/java/org/pentaho/di/trans/steps/getpreviousrowfield/GetPreviousRowFieldMeta.java:196

    return retval.toString();
  }

  @Override
  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {

    try {
      schema = rep.getStepAttributeString( id_step, "schema" );

      int nrkeys = rep.countNrStepAttributes( id_step, "in_stream_name" );

      // TODO NVL
      allocate( nrkeys );
      for ( int i = 0; i < nrkeys; i++ ) {
        fieldInStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "in_stream_name" ), "" );
        fieldOutStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "out_stream_name" ), "" );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "GetPreviousRowFieldMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "schema", schema );

      for ( int i = 0; i < fieldInStream.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "in_stream_name", fieldInStream[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "out_stream_name", fieldOutStream[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "GetPreviousRowFieldMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );
    }

View on GitHub (pinned to f3058517a1)