pentaho/pentaho-kettle · error · KettleException

InsertUpdateMeta.Exception.UnexpectedErrorReadingStepInfoFro…

Error message

InsertUpdateMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository

What it means

readRep failed while reading the step's configuration from the repository database; any exception is wrapped in a KettleException. The stored step attributes could not be fetched or interpreted for this Insert/Update step.

Solutions

  1. Test the repository database connection and re-login.
  2. Check the wrapped cause (e) for the underlying repository/SQL error.
  3. Restore consistency of R_STEP_ATTRIBUTE rows from backup, or re-save the step in Spoon to rewrite attributes.
  4. Run repository upgrade scripts so the schema matches the PDI version.

Example fix

// diagnostic approach
try { stepMeta.loadRep(rep, metaStore, id_step, databases, metaStore); }
catch (KettleException e) { logError("cause:", e); } // inspect root cause
Defensive patterns

Strategy: try-catch

Validate before calling

// check repository connectivity before load
Repository rep = new KettleDatabaseRepository();
rep.init(repositoryMeta);
rep.connect(username, password); // throws early if repo unreachable

Type guard

null

Try / catch

try { stepMeta.loadRep(rep, metaStore, idStep, databases, metaStore); }
catch (KettleException e) {
  logError("Repository read failed; root cause:", e.getCause());
  throw e;
}

Prevention

When it happens

Trigger: Repository connectivity failure while calling rep.getStepAttributeString/Boolean; repository schema out of sync with the PDI version; corrupted rows in R_STEP_ATTRIBUTE; inconsistent nrfields attribute.

Common situations: Database metadata repository unreachable or credentials expired; repository upgraded by newer PDI then opened by older; manual edits to repository tables.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java:390

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

      allocate( nrkeys, nrvalues );

      for ( int i = 0; i < nrkeys; i++ ) {
        keyFields[ i ].setKeyStream( rep.getStepAttributeString( id_step, i, "key_name" ) );
        keyFields[ i ].setKeyLookup( rep.getStepAttributeString( id_step, i, "key_field" ) );
        keyFields[ i ].setKeyCondition( rep.getStepAttributeString( id_step, i, "key_condition" ) );
        keyFields[ i ].setKeyStream2( rep.getStepAttributeString( id_step, i, "key_name2" ) );
      }

      for ( int i = 0; i < nrvalues; i++ ) {
        updateFields[ i ].setUpdateLookup( rep.getStepAttributeString( id_step, i, "value_name" ) );
        updateFields[ i ].setUpdateStream( rep.getStepAttributeString( id_step, i, "value_rename" ) );
        updateFields[ i ].setUpdate(
          Boolean.valueOf( rep.getStepAttributeBoolean( id_step, i, "value_update", true ) ) );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "InsertUpdateMeta.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, "update_bypassed", updateBypassed );

      for ( int i = 0; i < keyFields.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "key_name", keyFields[ i ].getKeyStream() );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_field", keyFields[ i ].keyLookup );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_condition", keyFields[ i ].getKeyCondition() );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_name2", keyFields[ i ].getKeyStream2() );

View on GitHub (pinned to f3058517a1)