{"record":{"id":"4b39ac7ecd76a674","repo":"pentaho/pentaho-kettle","slug":"cubeoutputmeta-exception-unabletosavestepinfo","errorCode":"CubeOutputMeta.Exception.UnableToSaveStepInfo","errorMessage":"CubeOutputMeta.Exception.UnableToSaveStepInfo","messagePattern":"CubeOutputMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeoutput/CubeOutputMeta.java","lineNumber":176,"sourceCode":"    try {\n      filename = rep.getStepAttributeString( id_step, \"file_name\" );\n      addToResultFilenames = rep.getStepAttributeBoolean( id_step, \"add_to_result_filenames\" );\n      doNotOpenNewFileInit = rep.getStepAttributeBoolean( id_step, \"do_not_open_newfile_init\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo\" ), e );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      rep.saveStepAttribute( id_transformation, id_step, \"file_name\", filename );\n      rep.saveStepAttribute( id_transformation, id_step, \"add_to_result_filenames\", addToResultFilenames );\n      rep.saveStepAttribute( id_transformation, id_step, \"do_not_open_newfile_init\", doNotOpenNewFileInit );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"CubeOutputMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,\n    Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n\n    // Check output fields\n    if ( prev != null && prev.size() > 0 ) {\n      cr =\n        new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString(\n          PKG, \"CubeOutputMeta.CheckResult.ReceivingFields\", String.valueOf( prev.size() ) ), stepMeta );\n      remarks.add( cr );\n    }\n\n    cr =","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeoutput/CubeOutputMeta.java#L158-L194","documentation":"CubeOutputMeta.saveRep persists the Cube Output step's settings (file_name, add_to_result_filenames, do_not_open_newfile_init) via rep.saveStepAttribute. Any KettleException from the repository is wrapped with 'CubeOutputMeta.Exception.UnableToSaveStepInfo' plus the step id. It means the Cube Output step's metadata could not be written to the repository.","triggerScenarios":"saveRep while rep.saveStepAttribute throws: repository connection lost, insufficient write permission, DB constraint violation, or storage failure for the step attribute rows.","commonSituations":"Saving a ktr to a database repository during a network outage; read-only repository credentials; repository table full or constraint violation after a PDI version upgrade; concurrent edits by another user locking rows.","solutions":["Verify repository connectivity and retry the save.","Check the wrapped cause exception for the exact repository/SQL error.","Ensure the repository user has write permission on the transformation and step attribute tables.","Save locally as XML to preserve work, then resolve repository issues before re-saving."],"exampleFix":"// before: single blind save\ntransMeta.saveRep(rep, metaStore, transId, null);\n// after: retry with reconnect on failure\ntry {\n  transMeta.saveRep(rep, metaStore, transId, null);\n} catch (KettleException e) {\n  if (!rep.isConnected()) { rep.connect(); }\n  transMeta.saveRep(rep, metaStore, transId, null);\n}","handlingStrategy":"try-catch","validationCode":"if (rep == null || !rep.isConnected()) { throw new KettleException(\"Repository not connected; cannot save Cube Output step\"); }","typeGuard":null,"tryCatchPattern":"try { cubeOutputMeta.saveRep(rep, metaStore, transId, stepId); } catch (KettleException e) { logError(\"Save failed: \" + e.getCause().getMessage(), e); // fallback: save as XML\ntransMeta.setFilename(localBackupPath); transMeta.saveXml(); }","preventionTips":["Save a local XML copy before writing to the repository.","Ensure the repository user can write to r_step_attribute.","Avoid concurrent edits of the same transformation by multiple users.","Check DB tablespace/size limits before bulk saves."],"tags":["kettle","repository","persistence","step-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"}