{"record":{"id":"f9edc95a5e7ea3e4","repo":"pentaho/pentaho-kettle","slug":"elasticsearchbulkmeta-exception-errorreadingrepository","errorCode":"ElasticSearchBulkMeta.Exception.ErrorReadingRepository","errorMessage":"ElasticSearchBulkMeta.Exception.ErrorReadingRepository","messagePattern":"ElasticSearchBulkMeta\\.Exception\\.ErrorReadingRepository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/elasticsearch-bulk-insert/core/src/main/java/org/pentaho/di/trans/steps/elasticsearchbulk/ElasticSearchBulkMeta.java","lineNumber":636,"sourceCode":"      clearServers();\n      int serversNr = rep.countNrStepAttributes( id_step, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_ADDRESS ) );\n      for ( int i = 0; i < serversNr; i++ ) {\n        String addr = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_ADDRESS ) );\n        int port = (int) rep.getStepAttributeInteger( id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_PORT ) );\n        addServer( addr, port );\n      }\n\n      // Settings\n      clearSettings();\n      int settingsNr = rep.countNrStepAttributes( id_step, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_NAME ) );\n      for ( int i = 0; i < settingsNr; i++ ) {\n        String name = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_NAME ) );\n        String value = rep.getStepAttributeString( id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_VALUE ) );\n        addSetting( name, value );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException(\n              BaseMessages.getString( PKG, \"ElasticSearchBulkMeta.Exception.ErrorReadingRepository\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n          throws KettleException {\n    try {\n\n      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_INDEX ), getIndex() );\n      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TYPE ), getType() );\n\n      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_BATCH_SIZE ),\n              batchSize );\n      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TIMEOUT ),\n              getTimeOut() );\n      rep.saveStepAttribute( id_transformation, id_step, joinRepAttr( Dom.TAG_GENERAL, Dom.TAG_TIMEOUT_UNIT ),\n              getTimeoutUnit().toString() );\n","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/elasticsearch-bulk-insert/core/src/main/java/org/pentaho/di/trans/steps/elasticsearchbulk/ElasticSearchBulkMeta.java#L618-L654","documentation":"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.","triggerScenarios":"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.","commonSituations":"Repository DB down or migrated, corrupted r_step_attribute rows, loading a transformation from a repository created by an incompatible Pentaho version.","solutions":["Check repository database connectivity and credentials","Verify r_step_attribute rows for the id_step are intact (or re-save the transformation)","Re-save the step from Spoon to regenerate repository attributes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before loading from repository:\n// verify DB reachable and attribute rows exist\nSELECT COUNT(*) FROM r_step_attribute WHERE id_step = ?;","typeGuard":null,"tryCatchPattern":"try { stepMeta.loadMeta(rep, ...); } catch (KettleException e) {\n  log.error(\"Repository read failed for step: \" + e.getMessage(), e);\n  // fall back to XML export or re-save step\n}","preventionTips":["Monitor repository database health and backups","Avoid sharing repositories across incompatible Pentaho versions","Re-save transformations after repository migrations"],"tags":["kettle","repository","database","metadata"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}