pentaho/pentaho-kettle · error · KettleException

ElasticSearchBulkMeta.Exception.ErrorReadingRepository

ElasticSearchBulkMeta.Exception.ErrorReadingRepository

Error message

ElasticSearchBulkMeta.Exception.ErrorReadingRepository

What it means

The ElasticSearchBulkMeta constructor that loads step metadata from a repository (readStepAttributes path) wraps any exception in a KettleException keyed 'ElasticSearchBulkMeta.Exception.ErrorReadingRepository'. It means reading this step's attributes from the repository database failed.

Solutions

  1. Check repository database connectivity and credentials
  2. Verify r_step_attribute rows for the id_step are intact (or re-save the transformation)
  3. Re-save the step from Spoon to regenerate repository attributes
Defensive patterns

Strategy: try-catch

Validate before calling

// before loading from repository:
// verify DB reachable and attribute rows exist
SELECT COUNT(*) FROM r_step_attribute WHERE id_step = ?;

Try / catch

try { stepMeta.loadMeta(rep, ...); } catch (KettleException e) {
  log.error("Repository read failed for step: " + e.getMessage(), e);
  // fall back to XML export or re-save step
}

Prevention

When it happens

Trigger: ElasticSearchBulkMeta(rep, stepMeta, ...) loading settings rows via rep.getStepAttributeString for id_step; a database error (connection lost, missing table, bad id_step) or non-numeric attribute data triggers it.

Common situations: Repository DB down or migrated, corrupted r_step_attribute rows, loading a transformation from a repository created by an incompatible Pentaho version.

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

Appendix: source

Thrown at plugins/elasticsearch-bulk-insert/core/src/main/java/org/pentaho/di/trans/steps/elasticsearchbulk/ElasticSearchBulkMeta.java:636

      clearServers();
      int serversNr = rep.countNrStepAttributes( id_step, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_ADDRESS ) );
      for ( int i = 0; i < serversNr; i++ ) {
        String addr = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_ADDRESS ) );
        int port = (int) rep.getStepAttributeInteger( id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_PORT ) );
        addServer( addr, port );
      }

      // Settings
      clearSettings();
      int settingsNr = rep.countNrStepAttributes( id_step, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_NAME ) );
      for ( int i = 0; i < settingsNr; i++ ) {
        String name = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_NAME ) );
        String value = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_VALUE ) );
        addSetting( name, value );
      }

    } catch ( Exception e ) {
      throw new KettleException(
              BaseMessages.getString( PKG, "ElasticSearchBulkMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
          throws KettleException {
    try {

      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_INDEX ), getIndex() );
      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TYPE ), getType() );

      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_BATCH_SIZE ),
              batchSize );
      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TIMEOUT ),
              getTimeOut() );
      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TIMEOUT_UNIT ),
              getTimeoutUnit().toString() );

View on GitHub (pinned to f3058517a1)