pentaho/pentaho-kettle · error · KettleException

ZipFileMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

ZipFileMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

ZipFileMeta.readRep wraps any Exception thrown while loading the step's settings from the repository (database) into this KettleException. It means step attributes could not be read for the given id_step, so the transformation cannot be loaded from that repository.

Solutions

  1. Check the chained cause 'e' — typically a JDBC exception naming the repository DB problem.
  2. Test the repository connection (Tools > Repository > Connect) and reconnect.
  3. Verify repository schema version matches your PDI version; re-run the repository upgrade scripts if needed.
  4. Delete and re-create the ZipFile step in the transformation, then re-save it to rewrite its attributes.

Example fix

// before: stale repository connection throws inside readRep
transMeta = KettleEnvironment.loadTransMeta(rep, id_transformation);
// after: reconnect the repository first
rep.disconnect();
rep.connect("admin", "password");
transMeta = KettleEnvironment.loadTransMeta(rep, id_transformation);
Defensive patterns

Strategy: retry

Validate before calling

// verify repository is reachable before loading
if (!rep.isConnected()) rep.connect(user, pass);
// optionally: SELECT COUNT(*) FROM r_step_attribute WHERE id_step = ?

Try / catch

try {
    transMeta = loadTransMeta(rep, id_transformation);
} catch (KettleException e) {
    if (e.getMessage().contains("UnexpectedErrorReadingStepInfo")) {
        rep.disconnect(); rep.connect(user, pass); // reconnect and retry once
    } else { throw e; }
}

Prevention

When it happens

Trigger: readRep throws when rep.getStepAttributeString/Boolean calls fail — repository database connection dropped mid-read, R_PERMISSIONS/schema mismatch, or corrupted r_step_attribute rows for the step.

Common situations: Repository database upgraded with an incompatible schema; stale repository connection after a DB restart; a partially-saved transformation leaving missing attribute rows; permission loss on repository tables.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/zipfile/ZipFileMeta.java:256

      throw new KettleXMLException( BaseMessages.getString( PKG, "ZipFileMeta.Exception.UnableToReadStepInfo" ), e );
    }
  }

  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" );
      baseFolderField = rep.getStepAttributeString( id_step, "baseFolderField" );
      operationType =
        getOperationTypeByCode( Const.NVL( rep.getStepAttributeString( id_step, "operation_type" ), "" ) );
      addresultfilenames = rep.getStepAttributeBoolean( id_step, "addresultfilenames" );
      overwritezipentry = rep.getStepAttributeBoolean( id_step, "overwritezipentry" );
      createparentfolder = rep.getStepAttributeBoolean( id_step, "createparentfolder" );
      keepsourcefolder = rep.getStepAttributeBoolean( id_step, "keepsourcefolder" );
      movetofolderfield = rep.getStepAttributeString( id_step, "movetofolderfield" );

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

  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, "baseFolderField", baseFolderField );
      rep.saveStepAttribute( id_transformation, id_step, "operation_type", getOperationTypeCode( operationType ) );
      rep.saveStepAttribute( id_transformation, id_step, "addresultfilenames", addresultfilenames );
      rep.saveStepAttribute( id_transformation, id_step, "overwritezipentry", overwritezipentry );
      rep.saveStepAttribute( id_transformation, id_step, "createparentfolder", createparentfolder );
      rep.saveStepAttribute( id_transformation, id_step, "keepsourcefolder", keepsourcefolder );
      rep.saveStepAttribute( id_transformation, id_step, "movetofolderfield", movetofolderfield );

    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( PKG, "ZipFileMeta.Exception.UnableToSaveStepInfo" )

View on GitHub (pinned to f3058517a1)