pentaho/pentaho-kettle · error · KettleException

GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

Error message

GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

What it means

readRep loads the step's metadata from the Pentaho Repository; any exception while reading step attributes is wrapped in a KettleException with key GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository. The stored repository definition could not be read.

Solutions

  1. Check repository connectivity (login, network, repository service) and retry opening the transformation
  2. Compare the stored step attributes in the repository (r_step_attribute rows for id_step) and repair/re-save the step in Spoon
  3. Recreate the step metadata in Spoon and save it back to the repository to rewrite its attributes
  4. Inspect the wrapped cause exception for the exact repository error (SQL, auth, missing object)

Example fix

// cause often surfaces in the wrapped exception — log it
try {
  readRep( rep, metaStore, id_step, nr );
} catch ( KettleException ke ) {
  logError( "repository read failed", ke ); // inspect ke.getCause() for the real repo error
  throw ke;
}
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check repository access before loading metadata
if ( !repository.isConnected() || repository.findStep( id_step ) == null ) {
  throw new IllegalStateException( "Repository not accessible or step object missing" );
}

Try / catch

try {
  transMeta.loadRep( repo, metaStore, transObjectId, null, null );
} catch ( KettleException e ) {
  if ( e.getMessage().contains( "UnexpectedErrorReadingStepInfoFromRepository" ) ) {
    log.error( "Repo read failed", e.getCause() ); // cause names the repository error
    // re-save the step in Spoon or check repository connectivity
  }
}

Prevention

When it happens

Trigger: loadXML-equivalent readRep(id_step...) throws while calling rep.getStepAttributeString / getNumberAttribute for table/stream fields and date masks — repository connectivity issues, missing attributes, or repository API errors.

Common situations: Repository server unreachable or session expired mid-load; repository row for the step partially written (missing attributes); corrupted repository database after an interrupted save; permission problems reading the transformation.

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

Appendix: source

Thrown at plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java:321

      tableName = rep.getStepAttributeString( id_step, "table" );
      loadAction = rep.getStepAttributeString( id_step, "load_action" );
      stopOnError = rep.getStepAttributeBoolean( id_step, "stop_on_error" );

      dbNameOverride = rep.getStepAttributeString( id_step, "dbname_override" );
      enclosure = rep.getStepAttributeString( id_step, "enclosure" );
      delimiter = rep.getStepAttributeString( id_step, "delimiter" );

      int nrvalues = rep.countNrStepAttributes( id_step, "stream_name" );

      allocate( nrvalues );

      for ( int i = 0; i < nrvalues; i++ ) {
        fieldTable[i] = rep.getStepAttributeString( id_step, i, "stream_name" );
        fieldStream[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        dateMask[i] = rep.getStepAttributeString( id_step, i, "date_mask" );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );

      rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
      rep.saveStepAttribute( id_transformation, id_step, "table", tableName );

      rep.saveStepAttribute( id_transformation, id_step, "load_action", loadAction );

      rep.saveStepAttribute( id_transformation, id_step, "dbname_override", dbNameOverride );
      rep.saveStepAttribute( id_transformation, id_step, "enclosure", enclosure );
      rep.saveStepAttribute( id_transformation, id_step, "delimiter", delimiter );
      rep.saveStepAttribute( id_transformation, id_step, "stop_on_error", stopOnError );

View on GitHub (pinned to f3058517a1)