{"record":{"id":"ea2701b0e624cd6c","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-step-information-to-the-repository-for-id-ea2701","errorCode":null,"errorMessage":"Unable to save step information to the repository for id_step=","messagePattern":"Unable to save step information to the repository for id_step=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmljoin/XMLJoinMeta.java","lineNumber":232,"sourceCode":"    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )\n    throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"valueXMLfield\", valueXMLfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetXMLstep\", targetXMLstep );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetXMLfield\", targetXMLfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"sourceXMLstep\", sourceXMLstep );\n      rep.saveStepAttribute( id_transformation, id_step, \"sourceXMLfield\", sourceXMLfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"complexJoin\", complexJoin );\n      rep.saveStepAttribute( id_transformation, id_step, \"targetXPath\", targetXPath );\n      rep.saveStepAttribute( id_transformation, id_step, \"joinCompareField\", joinCompareField );\n      rep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );\n      rep.saveStepAttribute( id_transformation, id_step, \"omitXMLHeader\", omitXMLHeader );\n      rep.saveStepAttribute( id_transformation, id_step, \"omitNullValues\", omitNullValues );\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    // checks for empty field which are required\n    if ( this.targetXMLstep == null || this.targetXMLstep.length() == 0 ) {\n      cr =\n          new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString( PKG,\n              \"XMLJoin.CheckResult.TargetXMLStepNotSpecified\" ), stepMeta );\n      remarks.add( cr );\n    } else {\n      cr =\n          new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG,\n              \"XMLJoin.CheckResult.TargetXMLStepSpecified\" ), stepMeta );","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmljoin/XMLJoinMeta.java#L214-L250","documentation":"XMLJoinMeta.saveRep persists the step's settings (targetXPath, joinCompareField, encoding, omitXMLHeader, omitNullValues) as step attributes in the Kettle repository. Any exception raised by the repository while saving these attributes is wrapped in this KettleException with the step id appended. It signals that the step definition could not be persisted, not that a transformation run failed.","triggerScenarios":"Calling saveRep during transformation save when the repository connection is broken, the repository is read-only, a saveStepAttribute call fails (e.g. invalid id_step, database error), or encoding/attribute values cannot be stored.","commonSituations":"Saving a transformation to a database repository that has gone down or lost connectivity; saving to a repository where the user lacks write permission; corrupted repository metadata tables.","solutions":["Check repository connectivity and reconnect before saving","Verify the repository user has write permissions","Retry saving the transformation after fixing the repository","Inspect the wrapped cause (e.getCause()) for the underlying repository error"],"exampleFix":"// before\nrep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );\n// after\nif ( rep == null ) { return; } // skip repository save when running file-only\nrep.saveStepAttribute( id_transformation, id_step, \"encoding\", encoding );","handlingStrategy":"try-catch","validationCode":"// before saving\nif ( rep == null || !rep.isConnected() ) { throw new IllegalStateException(\"Repository not connected\"); }","typeGuard":"boolean repoWritable = rep != null && rep.isConnected();","tryCatchPattern":"try { meta.saveRep(rep, metaStore, idTransformation, idStep); } catch (KettleException e) { log.error(\"Repo save failed for step\", e); throw e; }","preventionTips":["Check repository connectivity before programmatic saves","Grant repository write permissions to service accounts","Keep repository DB backups; watch for quota/size limits","Always inspect the KettleException cause chain"],"tags":["kettle","repository","persistence"],"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"}