{"record":{"id":"9b45e870695796eb","repo":"pentaho/pentaho-kettle","slug":"cubeinputmeta-exception-erroropeningorreadingcubefile","errorCode":"CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile","errorMessage":"CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile","messagePattern":"CubeInputMeta\\.Exception\\.ErrorOpeningOrReadingCubeFile","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java","lineNumber":174,"sourceCode":"                                   VariableSpace space, Repository repository,\n                                   IMetaStore metaStore ) throws KettleStepException {\n    GZIPInputStream fis = null;\n    DataInputStream dis = null;\n    try {\n      InputStream is = KettleVFS.getInstance( bowl ).getInputStream( space.environmentSubstitute( filename ), space );\n      fis = new GZIPInputStream( is );\n      dis = new DataInputStream( fis );\n\n      RowMetaInterface add = new RowMeta( dis );\n      for ( int i = 0; i < add.size(); i++ ) {\n        add.getValueMeta( i ).setOrigin( name );\n      }\n      r.mergeRowMeta( add );\n    } catch ( KettleFileException kfe ) {\n      throw new KettleStepException(\n        BaseMessages.getString( PKG, \"CubeInputMeta.Exception.UnableToReadMetaData\" ), kfe );\n    } catch ( IOException e ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile\" ), e );\n    } finally {\n      try {\n        if ( fis != null ) {\n          fis.close();\n        }\n        if ( dis != null ) {\n          dis.close();\n        }\n      } catch ( IOException ioe ) {\n        throw new KettleStepException( BaseMessages.getString(\n          PKG, \"CubeInputMeta.Exception.UnableToCloseCubeFile\" ), ioe );\n      }\n    }\n  }\n\n  @Override public String getXML() {\n    StringBuilder retval = new StringBuilder( 300 );","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java#L156-L192","documentation":"CubeInputMeta.getFields() opens the cube file and reads its row metadata; an IOException during opening or reading is wrapped in this KettleStepException, indicating an I/O problem with the cube file.","triggerScenarios":"getFields attempts new FileInputStream/DataInputStream on the configured filename and the file is missing, unreadable, or a directory — IOException is thrown.","commonSituations":"Wrong or relative path; file deleted or moved after configuration; insufficient OS permissions; running on a node where the file doesn't exist.","solutions":["Check the file exists and is readable at the configured absolute path.","Fix permissions (chmod/chown) on the file and its directories.","Use environment variables like ${Internal.Transformation.Filename.Directory} to build reliable paths.","Confirm the step's filename field is not empty."],"exampleFix":"// before\nmeta.setFilename( \"data.cube\" );\n// after\nmeta.setFilename( \"/opt/pdi/files/data.cube\" );","handlingStrategy":"validation","validationCode":"java.io.File f = new java.io.File( meta.getFilename() );\nif ( !f.isFile() || !f.canRead() ) throw new IllegalStateException( \"Cube file missing/unreadable: \" + f );","typeGuard":null,"tryCatchPattern":"try {\n  meta.getFields( row, name, null, null, null, metaStore );\n} catch ( KettleStepException e ) {\n  logError( \"Check cube file path and permissions: \" + e.getMessage(), e );\n}","preventionTips":["Use absolute paths or PDI internal path variables.","Check file existence with File.exists()/canRead() before execution.","Ensure the runtime user has read permission on the file."],"tags":["kettle","pdi","io","file"],"backgroundTag":"file-open-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"}