{"record":{"id":"8864d24c60995e32","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-8864d2","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=<id_step>","messagePattern":"Unable to save step information to the repository for id_step=<id_step>","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/addxml/AddXMLMeta.java","lineNumber":332,"sourceCode":"\n      for ( int i = 0; i < outputFields.length; i++ ) {\n        XMLField field = outputFields[i];\n\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", field.getFieldName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_element\", field.getElementName() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\", field.getTypeDesc() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_format\", field.getFormat() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_currency\", field.getCurrencySymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_decimal\", field.getDecimalSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_group\", field.getGroupingSymbol() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_nullif\", field.getNullString() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_length\", field.getLength() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_precision\", field.getPrecision() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_attribute\", field.isAttribute() );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_attributeName\", field.getAttributeParentName() );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to save step information to the repository for id_step=\" + 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    CheckResult cr;\n    // TODO - add checks for empty fieldnames\n\n    // Check output fields\n    if ( prev != null && prev.size() > 0 ) {\n      cr =\n          new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString( PKG,\n              \"AddXMLMeta.CheckResult.FieldsReceived\", \"\" + prev.size() ), stepMeta );\n      remarks.add( cr );\n\n      String error_message = \"\";","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/addxml/AddXMLMeta.java#L314-L350","documentation":"AddXMLMeta.saveRep persists step settings via rep.saveStepAttribute. If any repository write fails, the exception is wrapped in KettleException with the message 'Unable to save step information to the repository for id_step=<id_step>'. The cause (KettleDatabaseException etc.) holds the real error.","triggerScenarios":"Saving a transformation containing an AddXML step where the repository insert/update into step attribute tables fails — DB down, lock timeout, constraint violation, or read-only connection.","commonSituations":"Repository database in read-only mode or out of disk; deadlock/lock contention from concurrent Spoon sessions; expired DB credentials mid-session.","solutions":["Read the wrapped cause (ke.getCause()) for the SQL/repository error","Verify the repository database is writable and reachable (check credentials, disk space)","Retry saving; if lock contention, close other Spoon sessions holding the transformation","Check r_step_attribute table integrity/constraints if errors persist"],"exampleFix":"// before\nKettleDatabaseException dbe; // silently ignored\n// after\ntry { transMeta.saveRep(repo, metaStore, transId); } catch (KettleException ke) { logError(\"Save failed\", ke.getCause()); }","handlingStrategy":"try-catch","validationCode":"if (repository.isReadOnly != null && repository.isReadOnly()) failFast(\"Repository is read-only; save will fail\");","typeGuard":null,"tryCatchPattern":"try { meta.saveRep(repo, metaStore, transId, stepId); }\ncatch (KettleException e) {\n  logError(\"Save failed for id_step=\" + stepId, e.getCause());\n  // retry or fall back to local file export\n}","preventionTips":["Confirm DB credentials/disk space before long editing sessions","Avoid multiple Spoon sessions saving the same transformation concurrently","Periodically export transformations to XML as backup"],"tags":["repository","database","write-failed","kettle"],"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"}