pentaho/pentaho-kettle · error · KettleException

SalesforceUpsertMeta.Exception.ErrorReadingRepository

Error message

SalesforceUpsertMeta.Exception.ErrorReadingRepository

What it means

This KettleException wraps any failure while reading the Salesforce Upsert step's saved settings from the Pentaho repository in readRep — the upsert counterpart of the update step's equivalent. Repository attribute reads that fail are rethrown with this localized message and the underlying cause attached; the step metadata cannot be loaded.

Solutions

  1. Check the chained cause to identify the true repository failure and fix it.
  2. Verify the repository connection settings and connectivity before opening the transformation.
  3. Confirm the transformation/step IDs exist in the repository tables.
  4. Re-save the step via the PDI UI to regenerate missing repository attributes.

Example fix

// before
meta.readRep(repository, metaStore, stepMeta.getObjectId(), null);
// after
try {
  meta.readRep(repository, metaStore, stepMeta.getObjectId(), null);
} catch (KettleException e) {
  logError("Repository read failed for Salesforce Upsert step", e);
  repository.connect(); // reconnect then retry the load
  meta.readRep(repository, metaStore, stepMeta.getObjectId(), null);
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (repository == null || !repository.isConnected()) throw new IllegalStateException("Repository not connected before readRep");

Try / catch

try { meta.readRep(rep, metaStore, idStep, null); } catch (KettleException e) { log.error("ErrorReadingRepository, cause: " + e.getCause(), e); throw e; }

Prevention

When it happens

Trigger: Calling readRep on SalesforceUpsertMeta when rep.getStepAttributeString/getStepAttributeBoolean throw — repository connection lost, id_step missing, or repository metadata tables inaccessible.

Common situations: Loading an upsert step from a database repository with a stale/timed-out connection; repository schema migration gaps; orphaned step rows after repository restore.

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

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupsert/SalesforceUpsertMeta.java:311

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    super.readRep( rep, metaStore, id_step, databases );
    try {
      setUpsertField( rep.getStepAttributeString( id_step, "upsertfield" ) );
      setBatchSize( rep.getStepAttributeString( id_step, "batchSize" ) );
      setSalesforceIDFieldName( rep.getStepAttributeString( id_step, "salesforceIDFieldName" ) );
      int nrFields = rep.countNrStepAttributes( id_step, "field_name" );
      allocate( nrFields );

      for ( int i = 0; i < nrFields; i++ ) {
        updateLookup[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        updateStream[i] = rep.getStepAttributeString( id_step, i, "field_attribut" );
        useExternalId[i] =
          Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, "field_useExternalId", false ) );
      }
      setRollbackAllChangesOnError( rep.getStepAttributeBoolean( id_step, "rollbackAllChangesOnError" ) );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SalesforceUpsertMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    super.saveRep( rep, metaStore, id_transformation, id_step );
    try {
      rep.saveStepAttribute( id_transformation, id_step, "batchSize", getBatchSize() );
      rep.saveStepAttribute( id_transformation, id_step, "upsertfield", getUpsertField() );
      rep.saveStepAttribute( id_transformation, id_step, "salesforceIDFieldName", getSalesforceIDFieldName() );

      for ( int i = 0; i < updateLookup.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", getUpdateLookup()[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_attribut", getUpdateStream()[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_useExternalId", getUseExternalId()[i]
          .booleanValue() );

      }

View on GitHub (pinned to f3058517a1)