pentaho/pentaho-kettle · error · KettleException

ProcessFilesMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

ProcessFilesMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

Thrown by ProcessFilesMeta.readRep when an exception occurs while reading the step's attributes from the repository (rep.getStepAttribute* calls). It wraps the cause in a KettleException signaling the step info could not be loaded from the repository database.

Solutions

  1. Check the wrapped cause of the KettleException to identify the repository error (connection vs. data).
  2. Verify repository connectivity and credentials; retry loading.
  3. Upgrade/repair the repository schema with the PDI database upgrade scripts for your version.
  4. Re-save the step/transformation from a working client, or recreate the ProcessFiles step in the transformation.
  5. Restore affected repository rows from a database backup.

Example fix

// before
sh spoon.sh  # with old repository schema
// after
./pentaho-solutions/administration/.../upgrade_repository.sql applied, then reconnect and load
Defensive patterns

Strategy: try-catch

Validate before calling

// Check repository connectivity before loading:
Repository repo = KettleLogStore... // simplified
boolean connected = repository != null && repository.isConnected();

Try / catch

try {
  transMeta.loadFromRepository(rep, id_transformation, null);
} catch (KettleException e) {
  if (e.getMessage().contains("UnexpectedErrorReadingStepInfo")) {
    logError("Repository read failed for step; cause: " + e.getCause());
  } else throw e;
}

Prevention

When it happens

Trigger: readRep() throws while fetching any step attribute by id_step; typically repository connection/schema issues or a null/invalid id_step inside the try block.

Common situations: Repository database schema out of date (run PDI upgrade scripts); corrupted step rows in R_STEP_ATTRIBUTE; connectivity failure to the repository mid-load; loading a transformation whose step was saved by an incompatible PDI version.

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/012110400add0216. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/processfiles/ProcessFilesMeta.java:282

      }
    }
    return 0;
  }

  @Override
  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      sourcefilenamefield = rep.getStepAttributeString( id_step, "sourcefilenamefield" );
      targetfilenamefield = rep.getStepAttributeString( id_step, "targetfilenamefield" );
      operationType =
        getOperationTypeByCode( Const.NVL( rep.getStepAttributeString( id_step, "operation_type" ), "" ) );
      addresultfilenames = rep.getStepAttributeBoolean( id_step, "addresultfilenames" );
      overwritetargetfile = rep.getStepAttributeBoolean( id_step, "overwritetargetfile" );
      createparentfolder = rep.getStepAttributeBoolean( id_step, "createparentfolder" );
      simulate = rep.getStepAttributeBoolean( id_step, "simulate" );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "ProcessFilesMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "sourcefilenamefield", sourcefilenamefield );
      rep.saveStepAttribute( id_transformation, id_step, "targetfilenamefield", targetfilenamefield );
      rep.saveStepAttribute( id_transformation, id_step, "operation_type", getOperationTypeCode( operationType ) );
      rep.saveStepAttribute( id_transformation, id_step, "addresultfilenames", addresultfilenames );
      rep.saveStepAttribute( id_transformation, id_step, "overwritetargetfile", overwritetargetfile );
      rep.saveStepAttribute( id_transformation, id_step, "createparentfolder", createparentfolder );
      rep.saveStepAttribute( id_transformation, id_step, "simulate", simulate );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "ProcessFilesMeta.Exception.UnableToSaveStepInfo" )
        + id_step, e );

View on GitHub (pinned to f3058517a1)