{"record":{"id":"4ec9331a7d4baef7","repo":"pentaho/pentaho-kettle","slug":"elasticsearchbulkmeta-exception-errorsavingtorepository","errorCode":"ElasticSearchBulkMeta.Exception.ErrorSavingToRepository","errorMessage":"ElasticSearchBulkMeta.Exception.ErrorSavingToRepository","messagePattern":"ElasticSearchBulkMeta\\.Exception\\.ErrorSavingToRepository","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":698,"sourceCode":"\n      // Servers\n      for ( int i = 0; i < servers.size(); i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_ADDRESS ),\n                servers.get( i ).address );\n        rep.saveStepAttribute( id_transformation, id_step, i, joinRepAttr( Dom.TAG_SERVER, Dom.TAG_SERVER_PORT ),\n                servers.get( i ).port );\n      }\n\n      // Settings\n      for ( int i = 0; i < settings.size(); i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_NAME ),\n                settings.get( i ).setting );\n        rep.saveStepAttribute( id_transformation, id_step, i, joinRepAttr( Dom.TAG_SETTING, Dom.TAG_SETTING_VALUE ),\n                settings.get( i ).value );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG,\n              \"ElasticSearchBulkMeta.Exception.ErrorSavingToRepository\", \"\" + id_step ), e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,\n                     String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,\n                     IMetaStore metaStore ) {\n\n    checkBasicRequiredFields( remarks, stepMeta );\n\n    checkInputFields( remarks, prev, stepMeta );\n\n  }\n\n  private void checkBasicRequiredFields( List<CheckResultInterface> remarks, StepMeta stepMeta ) {\n    checkRequiredString( remarks, stepMeta, getIndex(), BaseMessages.getString( PKG,\n            \"ElasticSearchBulkDialog.Index.Label\" ) );\n    checkRequiredString( remarks, stepMeta, getType(), BaseMessages.getString( PKG,","sourceCodeStart":680,"sourceCodeEnd":716,"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#L680-L716","documentation":"ElasticSearchBulkMeta.saveRep() persists each setting as a numbered step attribute; any failure is wrapped in a KettleException keyed 'ElasticSearchBulkMeta.Exception.ErrorSavingToRepository' with the id_step appended. It means the step's configuration could not be written to the repository.","triggerScenarios":"saveRep (public) called when saving a transformation: rep.saveStepAttribute throws due to repository connection loss, transaction failure, or constraint violation on the attribute rows.","commonSituations":"Repository DB read-only or out of space, connection dropped mid-save, saving a very large settings list into r_step_attribute.","solutions":["Verify repository DB is writable and the connection is alive, then retry the save","Check r_step_attribute for constraint/data issues (e.g. column length) blocking the write","As a workaround, save the transformation as XML instead of the repository"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before saving: confirm repository is writable\nSELECT 1; -- connectivity probe\n// ensure user has INSERT/UPDATE rights on r_step_attribute","typeGuard":null,"tryCatchPattern":"try { saveRep(rep, metaStore, idTrans, idStep); } catch (KettleException e) {\n  log.error(\"Repository save failed for id_step=\" + idStep + \": \" + e.getMessage(), e);\n  // retry once after reconnect, else export to XML\n}","preventionTips":["Verify repository user has write permissions before saving","Watch for database disk-space and connection-pool exhaustion","Keep XML exports as a fallback save format"],"tags":["kettle","repository","database","metadata"],"backgroundTag":"database-write-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"}