pentaho/pentaho-kettle · warning · KettleStepException
CubeInputMeta.Exception.UnableToCloseCubeFile
CubeInputMeta.Exception.UnableToCloseCubeFile
Error message
CubeInputMeta.Exception.UnableToCloseCubeFile
What it means
After reading the cube file's metadata, getFields closes the FileInputStream and DataInputStream in a finally block. If closing either stream throws IOException, this KettleStepException wraps it, signaling the cube file could not be closed cleanly.
Solutions
- Check storage health/availability of the filesystem hosting the cube file.
- Investigate the wrapped IOException root cause for the exact close failure.
- Retry the operation; transient network-storage errors often resolve on retry.
- Upgrade PDI — newer code uses try-with-resources, avoiding this path.
Defensive patterns
Strategy: try-catch
Try / catch
try {
meta.getFields( row, name, null, null, null, metaStore );
} catch ( KettleStepException e ) {
logWarn( "Non-fatal close failure on cube file: " + e.getMessage(), e );
} Prevention
- Ensure stable filesystem/network storage for cube files.
- Avoid closing the same stream concurrently from multiple threads.
- Upgrade to PDI versions using try-with-resources.
When it happens
Trigger: fis.close() or dis.close() in the finally block of getFields throws IOException.
Common situations: Filesystem/network storage issues (NFS stalls), stream already closed in a custom state, OS-level file descriptor problems. Rare in practice.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Cannot open control file
- Cannot open data file
- CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile
- MailConnection.Error.MovingMessages
- MailConnection.Error.WriteMboxFile
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/fa64600d8cc22142.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/cubeinput/CubeInputMeta.java:185
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 );
retval.append( " <file>" ).append( Const.CR );
retval.append( " " ).append( XMLHandler.addTagValue( "name", filename ) );
retval.append( " </file>" ).append( Const.CR );
retval.append( " " ).append( XMLHandler.addTagValue( "limit", rowLimit ) );
retval.append( " " ).append( XMLHandler.addTagValue( "addfilenameresult", addfilenameresult ) );
return retval.toString();
}
@Override public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )View on GitHub (pinned to f3058517a1)