{"record":{"id":"bf4d6d553aa71c3a","repo":"pentaho/pentaho-kettle","slug":"clonerowmeta-exception-unexpectederrorsavingstepinfo","errorCode":null,"errorMessage":"CloneRowMeta.Exception.UnexpectedErrorSavingStepInfo","messagePattern":"CloneRowMeta\\.Exception\\.UnexpectedErrorSavingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/clonerow/CloneRowMeta.java","lineNumber":222,"sourceCode":"      throw new KettleException( BaseMessages.getString(\n        PKG, \"CloneRowMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\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, \"nrclones\", nrclones );\n      rep.saveStepAttribute( id_transformation, id_step, \"addcloneflag\", addcloneflag );\n      rep.saveStepAttribute( id_transformation, id_step, \"cloneflagfield\", cloneflagfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"nrcloneinfield\", nrcloneinfield );\n      rep.saveStepAttribute( id_transformation, id_step, \"nrclonefield\", nrclonefield );\n      rep.saveStepAttribute( id_transformation, id_step, \"addclonenum\", addclonenum );\n\n      rep.saveStepAttribute( id_transformation, id_step, \"clonenumfield\", clonenumfield );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"CloneRowMeta.Exception.UnexpectedErrorSavingStepInfo\" ), e );\n    }\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,\n                         VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Output field (boolean) ?\n    if ( addcloneflag ) {\n      String realfieldValue = space.environmentSubstitute( cloneflagfield );\n      if ( !Utils.isEmpty( realfieldValue ) ) {\n        ValueMetaInterface v = new ValueMetaBoolean( realfieldValue );\n        v.setOrigin( origin );\n        rowMeta.addValueMeta( v );\n      }\n    }\n    // Output clone row number\n    if ( addclonenum ) {","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/clonerow/CloneRowMeta.java#L204-L240","documentation":"CloneRowMeta.saveRep persists the Clone Row step's settings to the Pentaho Repository via saveStepAttribute calls. If any repository write fails, the catch block rethrows as a KettleException with this message. It indicates the step metadata could not be saved.","triggerScenarios":"Saving a transformation to the repository when rep.saveStepAttribute throws — repository DB write failure, constraint violation, or read-only connection.","commonSituations":"Repository database disk full or read-only, transaction rollback on save, insufficient DB user privileges to insert into R_STEP_ATTRIBUTE.","solutions":["Check repository DB connectivity and user write privileges","Verify database disk space and that tables are not read-only","Retry saving; if it persists, save as XML file instead","Inspect repository DB error logs for the underlying failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Java: verify repository is writable before save\nif (repository.isReadOnly()) throw new IllegalStateException(\"Repository is read-only\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.save(rep, metaStore, comment);\n} catch (KettleException e) {\n  log.error(\"Step save failed; exporting to XML fallback\", e);\n  transMeta.exportResources();\n}","preventionTips":["Grant DB user INSERT/UPDATE privileges","Monitor DB disk space","Save frequently to catch failures early"],"tags":["repository","persistence","write-failure"],"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"}