pentaho/pentaho-kettle · error · KettleStepException
CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile
CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile
Error message
CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile
What it means
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.
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.
Example fix
// before meta.setFilename( "data.cube" ); // after meta.setFilename( "/opt/pdi/files/data.cube" );
Defensive patterns
Strategy: validation
Validate before calling
java.io.File f = new java.io.File( meta.getFilename() ); if ( !f.isFile() || !f.canRead() ) throw new IllegalStateException( "Cube file missing/unreadable: " + f );
Try / catch
try {
meta.getFields( row, name, null, null, null, metaStore );
} catch ( KettleStepException e ) {
logError( "Check cube file path and permissions: " + e.getMessage(), e );
} Prevention
- 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.
When it happens
Trigger: getFields attempts new FileInputStream/DataInputStream on the configured filename and the file is missing, unreadable, or a directory — IOException is thrown.
Common situations: Wrong or relative path; file deleted or moved after configuration; insufficient OS permissions; running on a node where the file doesn't exist.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- Cannot open control file
- Cannot open data file
- CubeInputMeta.Exception.UnableToCloseCubeFile
- GetSubFolders.Exception.MissingFiles
- KettleValueException wrapping generic Exception while…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/9b45e870695796eb.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java:174
VariableSpace space, Repository repository,
IMetaStore metaStore ) throws KettleStepException {
GZIPInputStream fis = null;
DataInputStream dis = null;
try {
InputStream is = KettleVFS.getInstance( bowl ).getInputStream( space.environmentSubstitute( filename ), space );
fis = new GZIPInputStream( is );
dis = new DataInputStream( fis );
RowMetaInterface add = new RowMeta( dis );
for ( int i = 0; i < add.size(); i++ ) {
add.getValueMeta( i ).setOrigin( name );
}
r.mergeRowMeta( add );
} catch ( KettleFileException kfe ) {
throw new KettleStepException(
BaseMessages.getString( PKG, "CubeInputMeta.Exception.UnableToReadMetaData" ), kfe );
} catch ( IOException e ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile" ), e );
} finally {
try {
if ( fis != null ) {
fis.close();
}
if ( dis != null ) {
dis.close();
}
} catch ( IOException ioe ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "CubeInputMeta.Exception.UnableToCloseCubeFile" ), ioe );
}
}
}
@Override public String getXML() {
StringBuilder retval = new StringBuilder( 300 );View on GitHub (pinned to f3058517a1)