{"record":{"id":"3e30f1562fa8aa82","repo":"pentaho/pentaho-kettle","slug":"cubeinputmeta-exception-unabletosavestepinfo","errorCode":"CubeInputMeta.Exception.UnableToSaveStepInfo","errorMessage":"CubeInputMeta.Exception.UnableToSaveStepInfo","messagePattern":"CubeInputMeta\\.Exception\\.UnableToSaveStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java","lineNumber":229,"sourceCode":"        rowLimit = String.valueOf( rep.getStepAttributeInteger( id_step, \"limit\" ) );\n      }\n      addfilenameresult = rep.getStepAttributeBoolean( id_step, \"addfilenameresult\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"CubeInputMeta.Exception.UnexpectedErrorWhileReadingStepInfo\" ), e );\n    }\n  }\n\n  @Override 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, \"file_name\", filename );\n      rep.saveStepAttribute( id_transformation, id_step, \"limit\", rowLimit );\n      rep.saveStepAttribute( id_transformation, id_step, \"addfilenameresult\", addfilenameresult );\n\n    } catch ( KettleException e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"CubeInputMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }\n\n  @Override public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,\n                               RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info,\n                               VariableSpace space, Repository repository, IMetaStore metaStore ) {\n    CheckResult cr;\n\n    cr =\n      new CheckResult( CheckResult.TYPE_RESULT_COMMENT, BaseMessages.getString(\n        PKG, \"CubeInputMeta.CheckResult.FileSpecificationsNotChecked\" ), stepMeta );\n    remarks.add( cr );\n  }\n\n  @Override public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,\n                                          Trans trans ) {\n    return new CubeInput( stepMeta, stepDataInterface, cnr, tr, trans );","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java#L211-L247","documentation":"CubeInputMeta.saveRep persists the Cube Input step's settings (file_name, limit, addfilenameresult) as step attributes in the Pentaho repository. If any rep.saveStepAttribute call throws a KettleException (e.g. repository connection lost, DB constraint, permission failure), it is wrapped in a KettleException prefixed with 'CubeInputMeta.Exception.UnableToSaveStepInfo' plus the step id. It indicates the step's metadata could not be saved to the repository.","triggerScenarios":"Calling saveRep (directly or by saving a transformation containing a Cube Input step) while the Repository's saveStepAttribute fails: repository DB down/disconnected, insufficient write permission on the transformation, corrupted repository schema, or attribute value rejected by the underlying storage.","commonSituations":"Saving a ktr to a database repository that lost connectivity mid-save; read-only repository user; repository upgrade mismatch between PDI client and repository schema; network blip on a remote repo.","solutions":["Verify repository connectivity (reconnect/test the repository connection) and retry saving the transformation.","Check the repository user has write permission on the target transformation/folder.","Inspect the wrapped cause (KettleException e) in the stack trace for the underlying repository/SQL error and fix that.","If the repository schema is outdated, run the repository upgrade scripts to match the PDI version.","As a workaround, save the transformation as a local XML file instead of the repository."],"exampleFix":"// before: saving silently to a possibly stale repository connection\ntransMeta.saveRep(rep, metaStore, transId, null);\n// after: validate the connection first and handle failure\nif (!rep.isConnected() && !rep.connect()) {\n  throw new KettleException(\"Repository unavailable; fix connection before saving\");\n}\ntry {\n  transMeta.saveRep(rep, metaStore, transId, null);\n} catch (KettleException e) {\n  logError(\"Unable to save step info: \" + e.getCause().getMessage(), e);\n}","handlingStrategy":"try-catch","validationCode":"if (rep == null || !rep.isConnected()) { throw new KettleException(\"Repository not connected; cannot save Cube Input step\"); }","typeGuard":null,"tryCatchPattern":"try { cubeInputMeta.saveRep(rep, metaStore, transId, stepId); } catch (KettleException e) { Throwable cause = e.getCause(); logError(\"Cube Input save failed: \" + (cause != null ? cause.getMessage() : e.getMessage()), e); if (!rep.isConnected()) rep.connect(); }","preventionTips":["Test the repository connection before long editing sessions and before saving.","Use a repository account with write privileges on the target folder.","Keep the PDI client and repository schema versions in sync.","Save to local XML as a checkpoint before repository 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"}