pentaho/pentaho-kettle · error · KettleException

SynchronizeAfterMergeMeta.Exception.UnexpectedErrorReadingSt…

Error message

SynchronizeAfterMergeMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

What it means

SynchronizeAfterMergeMeta.readRep() failed while loading the step's settings from the repository database (KettleException 'Unexpected error reading step info from repository'). Any exception raised while reading step attributes (e.g., repository connectivity or schema issues) is wrapped and rethrown.

Solutions

  1. Check repository connectivity and retry opening the transformation
  2. Inspect the 'Caused by' exception to find the failing attribute/query, then repair the repository row or schema
  3. Re-save the step from a working client to rewrite its repository attributes
  4. Restore/recreate the transformation entry in the repository

Example fix

// typically environmental; re-save via code
transMeta = new TransMeta(repository, transName, directory);
// if a specific attribute is broken, fix row in R_STEP_ATTRIBUTE for id_step
Defensive patterns

Strategy: try-catch

Validate before calling

// before loadRep
if (!repository.isConnected()) throw new IllegalStateException("Repository not connected");

Try / catch

try { stepMeta.loadRep(repository, metaStore, idStep, databases, metaStore); }
catch (KettleException e) { log.error("Repository read failed for step " + idStep + ": " + e.getMessage(), e.getCause()); throw e; }

Prevention

When it happens

Trigger: loadRep() called against a repository where the step attribute tables are unavailable/corrupt, the repository connection drops mid-read, or the stored attributes violate expectations (e.g., null/invalid types).

Common situations: Repository database migrated/upgraded with schema mismatch; network interruption between PDI and the repository DB; corrupt rows in R_STEP_ATTRIBUTE.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMergeMeta.java:590

      int nrkeys = rep.countNrStepAttributes( id_step, "key_name" );
      int nrvalues = rep.countNrStepAttributes( id_step, "value_name" );

      allocate( nrkeys, nrvalues );

      for ( int i = 0; i < nrkeys; i++ ) {
        keyStream[i] = rep.getStepAttributeString( id_step, i, "key_name" );
        keyLookup[i] = rep.getStepAttributeString( id_step, i, "key_field" );
        keyCondition[i] = rep.getStepAttributeString( id_step, i, "key_condition" );
        keyStream2[i] = rep.getStepAttributeString( id_step, i, "key_name2" );
      }

      for ( int i = 0; i < nrvalues; i++ ) {
        updateLookup[i] = rep.getStepAttributeString( id_step, i, "value_name" );
        updateStream[i] = rep.getStepAttributeString( id_step, i, "value_rename" );
        update[i] = Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, "value_update", true ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SynchronizeAfterMergeMeta.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, "commit", commitSize );
      rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
      rep.saveStepAttribute( id_transformation, id_step, "table", tableName );

      rep.saveStepAttribute( id_transformation, id_step, "tablename_in_field", tablenameInField );
      rep.saveStepAttribute( id_transformation, id_step, "tablename_field", tablenameField );
      rep.saveStepAttribute( id_transformation, id_step, "operation_order_field", operationOrderField );
      rep.saveStepAttribute( id_transformation, id_step, "order_insert", OrderInsert );
      rep.saveStepAttribute( id_transformation, id_step, "order_update", OrderUpdate );
      rep.saveStepAttribute( id_transformation, id_step, "order_delete", OrderDelete );

View on GitHub (pinned to f3058517a1)