{"record":{"id":"f275d6995c7c7243","repo":"pentaho/pentaho-kettle","slug":"cubeoutputmeta-exception-unexpectederrorinreadingstepinfo","errorCode":"CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo","errorMessage":"CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo","messagePattern":"CubeOutputMeta\\.Exception\\.UnexpectedErrorInReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeoutput/CubeOutputMeta.java","lineNumber":164,"sourceCode":"\n    retval.append( \"    <file>\" ).append( Const.CR );\n    retval.append( \"      \" ).append( XMLHandler.addTagValue( \"name\", filename ) );\n    retval.append( \"      \" ).append( XMLHandler.addTagValue( \"add_to_result_filenames\", addToResultFilenames ) );\n    retval.append( \"      \" ).append( XMLHandler.addTagValue( \"do_not_open_newfile_init\", doNotOpenNewFileInit ) );\n\n    retval.append( \"    </file>\" ).append( Const.CR );\n\n    return retval.toString();\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    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,","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeoutput/CubeOutputMeta.java#L146-L182","documentation":"CubeOutputMeta.readRep loads the Cube Output step's settings from a repository via rep.getStepAttributeString/getStepAttributeBoolean. Any failure is wrapped in a KettleException with 'CubeOutputMeta.Exception.UnexpectedErrorInReadingStepInfo'. It indicates the step attributes could not be read from the repository storage.","triggerScenarios":"loadRep -> readRep while the repository's getStepAttribute* calls throw: repository DB disconnected, attribute row locked/corrupted, permission denied reading the step, or repository schema mismatch.","commonSituations":"Opening a transformation stored in a database repository whose connection dropped; repository user lacking read access; repository upgraded by a newer PDI client so attribute lookups fail; corrupted r_step_attribute rows.","solutions":["Reconnect to the repository and retry opening the transformation.","Check the wrapped cause for the underlying repository/SQL error and address it (locks, permissions, schema).","Verify the repository user has read permission on the transformation.","If the stored step data is corrupted, re-create the Cube Output step or restore the repository from backup."],"exampleFix":"// before: opening with a dead repository reference\nTransMeta tm = new TransMeta(rep, transId, metaStore);\n// after: ensure the connection is alive first\nif (!rep.isConnected()) {\n  rep.connect();\n}\nTransMeta tm = new TransMeta(rep, transId, metaStore);","handlingStrategy":"try-catch","validationCode":"if (rep == null || !rep.isConnected()) { throw new KettleException(\"Repository not connected; cannot read Cube Output step\"); }","typeGuard":null,"tryCatchPattern":"try { transMeta = new TransMeta(rep, transId, metaStore); } catch (KettleException e) { logError(\"readRep failed for Cube Output: \" + e.getCause().getMessage(), e); rep.disconnect(); rep.connect(); transMeta = new TransMeta(rep, transId, metaStore); }","preventionTips":["Reconnect on repository idle timeouts before opening transformations.","Grant read access to all repository users who need to open transformations.","Monitor repository DB health; corruption in r_step_attribute triggers this.","Align repository schema version with the PDI client version."],"tags":["kettle","repository","step-metadata","persistence"],"backgroundTag":"database-query-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"}