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

GetRepositoryNamesMeta.readRep wraps any exception raised while loading this step's settings (directories, name masks, subfolder flags) from a Kettle repository into a KettleException. The library throws it because partial/corrupt repository metadata would otherwise leave the step metadata in an inconsistent state. The original cause is attached as the nested exception.

Solutions

  1. Verify the repository connection is alive (reconnect) and retry loading the transformation.
  2. Check the nested cause (e.getCause()) for the real repository/driver error and fix that underlying issue.
  3. Re-save the transformation from a working client to repair corrupted step attributes.
  4. Confirm repository plugin and Kettle versions match between writer and reader clients.

Example fix

// before: reading from a stale repository connection
KettleEnvironment.init();
TransMeta tm = new TransMeta(rep, transMetaId, metaStore); // throws

// after: ensure a live connection before loading
if ( !rep.isConnected() ) {
  rep.connect( username, password );
}
try {
  TransMeta tm = new TransMeta( rep, transMetaId, metaStore );
} catch ( KettleException e ) {
  logError( "Failed to read step info", e.getCause() );
}
Defensive patterns

Strategy: try-catch

Validate before calling

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

Try / catch

try {
  TransMeta tm = new TransMeta( rep, id, metaStore );
} catch ( KettleException e ) {
  log.error( "readRep failed: " + e.getMessage(), e.getCause() );
  // reconnect and retry once
}

Prevention

When it happens

Trigger: Calling readRep(Repository, IMetaStore, ObjectId, List<DatabaseMeta>) when any rep.getStepAttributeString/getStepAttributeBoolean call for id_step throws — e.g. repository connection dropped mid-read, the step's id_step row was deleted by another user, or a repository plugin/driver error occurs.

Common situations: Opening a transformation stored in a database repository where the DB connection has timed out; concurrent modification of the transformation; a repository schema upgrade mismatch between Pentaho versions.

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

Appendix: source

Thrown at plugins/get-repository-names/impl/src/main/java/org/pentaho/di/trans/steps/getrepositorynames/GetRepositoryNamesMeta.java:280

      if ( objectTypeString != null ) {
        objectTypeSelection = ObjectTypeSelection.valueOf( objectTypeString );
      }
      if ( objectTypeSelection == null ) {
        objectTypeSelection = ObjectTypeSelection.All;
      }
      includeRowNumber = rep.getStepAttributeBoolean( id_step, "rownum" );
      rowNumberField = rep.getStepAttributeString( id_step, "rownum_field" );

      allocate( nrfiles );

      for ( int i = 0; i < nrfiles; i++ ) {
        directory[i] = rep.getStepAttributeString( id_step, i, "directory" );
        nameMask[i] = rep.getStepAttributeString( id_step, i, "name_mask" );
        excludeNameMask[i] = rep.getStepAttributeString( id_step, i, "exclude_name_mask" );
        includeSubFolders[i] = rep.getStepAttributeBoolean( id_step, i, "include_subfolders" );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step information from the repository", e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "object_type", objectTypeSelection.toString() );
      rep.saveStepAttribute( id_transformation, id_step, "rownum", includeRowNumber );
      rep.saveStepAttribute( id_transformation, id_step, "rownum_field", rowNumberField );

      for ( int i = 0; i < directory.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "directory", directory[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "name_mask", nameMask[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "exclude_name_mask", excludeNameMask[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "include_subfolders", includeSubFolders[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
    }

View on GitHub (pinned to f3058517a1)