pentaho/pentaho-kettle · error · KettleException

ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo

ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

ChangeFileEncodingMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

ChangeFileEncodingMeta.readRep() wraps repository reads of the step's attributes in a try/catch and rethrows as KettleException with this message when loading the step's metadata from a Pentaho Repository database. Any repository/storage exception while reading step attributes produces this error.

Solutions

  1. Check repository database connectivity and credentials.
  2. Verify the repository schema version matches the Pentaho version (run the upgrade scripts).
  3. Re-open the transformation; if the step is corrupt, delete and recreate the step.
  4. Inspect the chained cause exception for the concrete SQL error.

Example fix

// before: loading with stale connection
TransMeta tm = new TransMeta(rep, "my transform");
// after: verify connectivity first
if ( !rep.isConnected() ) { rep.connect(); }
TransMeta tm = new TransMeta(rep, "my transform");
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify repository connectivity before loading
if ( !rep.test() ) { throw new IllegalStateException( "Repository unreachable" ); }

Try / catch

try {
  TransMeta tm = new TransMeta( rep, "my transform", null );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "UnexpectedErrorReadingStepInfo" ) ) {
    log.error( "Repository read failed for step: {}", e.getCause(), e );
  } else { throw e; }
}

Prevention

When it happens

Trigger: In readRep: rep.getStepAttributeString/getStepAttributeBoolean calls throw — database connectivity loss, repository schema mismatch, or corrupt r_step_attribute rows for this step.

Common situations: Repository database down or migrated mid-load; upgrading Pentaho against an older repository schema; corrupted attribute rows after a failed save.

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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/changefileencoding/ChangeFileEncodingMeta.java:210

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

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
    throws KettleException {
    try {
      filenamefield = rep.getStepAttributeString( id_step, "filenamefield" );
      targetfilenamefield = rep.getStepAttributeString( id_step, "targetfilenamefield" );
      sourceencoding = rep.getStepAttributeString( id_step, "sourceencoding" );
      targetencoding = rep.getStepAttributeString( id_step, "targetencoding" );

      addsourceresultfilenames = rep.getStepAttributeBoolean( id_step, "addsourceresultfilenames" );
      addtargetresultfilenames = rep.getStepAttributeBoolean( id_step, "addtargetresultfilenames" );
      createparentfolder = rep.getStepAttributeBoolean( id_step, "createparentfolder" );

    } catch ( Exception e ) {
      throw new KettleException(
          BaseMessages.getString( PKG, "ChangeFileEncodingMeta.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, "filenamefield", filenamefield );
      rep.saveStepAttribute( id_transformation, id_step, "targetfilenamefield", targetfilenamefield );
      rep.saveStepAttribute( id_transformation, id_step, "sourceencoding", sourceencoding );
      rep.saveStepAttribute( id_transformation, id_step, "targetencoding", targetencoding );

      rep.saveStepAttribute( id_transformation, id_step, "addsourceresultfilenames", addsourceresultfilenames );
      rep.saveStepAttribute( id_transformation, id_step, "addtargetresultfilenames", addtargetresultfilenames );
      rep.saveStepAttribute( id_transformation, id_step, "createparentfolder", createparentfolder );

    } catch ( Exception e ) {
      throw new KettleException(

View on GitHub (pinned to f3058517a1)