{"record":{"id":"d9e4755d33073406","repo":"pentaho/pentaho-kettle","slug":"cubeinputmeta-exception-unabletoreadmetadata","errorCode":"CubeInputMeta.Exception.UnableToReadMetaData","errorMessage":"CubeInputMeta.Exception.UnableToReadMetaData","messagePattern":"CubeInputMeta\\.Exception\\.UnableToReadMetaData","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java","lineNumber":171,"sourceCode":"  }\n\n  @Override public void getFields( Bowl bowl, RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,\n                                   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  }","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java#L153-L189","documentation":"CubeInputMeta.getFields() reads the row layout stored inside the cube file via DataInputStream. A KettleFileException while reading that metadata is wrapped in this KettleStepException, meaning the cube file's row metadata could not be deserialized.","triggerScenarios":"getFields (called by testGetFields or preview) opens the configured cube file and KettleFileException is thrown while reading the embedded RowMeta.","commonSituations":"Cube file corrupt or truncated; file written by an incompatible PDI version; wrong file configured in the step.","solutions":["Verify the file path points to a valid PDI cube file produced by CubeOutput.","Regenerate the cube file with CubeOutput from a working transformation.","Check that PDI versions used to write and read the cube are compatible."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  meta.getFields( row, name, null, null, null, metaStore );\n} catch ( KettleStepException e ) {\n  logError( \"Cube file metadata unreadable — regenerate the cube: \" + e.getMessage(), e );\n}","preventionTips":["Regenerate cube files whenever the producing transformation changes.","Verify cube files after transfer (size/checksum).","Keep writer and reader PDI versions compatible."],"tags":["kettle","pdi","cube-file","deserialization"],"backgroundTag":"file-read-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"}