pentaho/pentaho-kettle · error · KettleFileException
: Unable to read value data from input stream
Error message
: Unable to read value data from input stream
What it means
KettleFileException thrown by ValueMetaBase.readData wrapping an IOException (other than EOF/SocketTimeout, which map to KettleEOFException/rethrow): value data could not be read from the DataInputStream. The stream failed mid-read due to an I/O fault.
Solutions
- Inspect the wrapped cause (e.getCause()) for the root I/O error
- Validate stream/network health and re-establish the connection, then retry the transfer from a known checkpoint
- Check the source file for truncation/corruption and regenerate it
Example fix
// before
Object v = valueMeta.readData(inputStream); // network dropped mid-row
// after
try {
Object v = valueMeta.readData(inputStream);
} catch (KettleFileException e) {
reconnect(); inputStream = openStream(); // retry from checkpoint
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight the input stream:
if (inputStream == null) throw new IllegalStateException("Input stream is closed");
// available() > 0 on socket streams indicates data is present before a read attempt Try / catch
try {
Object v = valueMeta.readData(in);
} catch (KettleEOFException eof) {
// clean end of stream: stop reading, no retry
} catch (KettleFileException e) {
if (e.getCause() instanceof IOException) {
LOG.error("Stream read failed for field " + valueMeta.getName() + ": " + e.getCause().getMessage());
reconnectAndReopenStream(); // re-establish and resume from checkpoint
} else { throw e; }
} Prevention
- Distinguish KettleEOFException (normal end) from KettleFileException (I/O fault) when reading rows
- Add heartbeat/keep-alive on cluster socket streams to detect dead peers early
- Verify file integrity (size/checksum) before reading Kettle-serialized files
- Avoid concurrent reads/closes on the same stream from multiple threads
When it happens
Trigger: readData() called on a DataInputStream from a socket or file that broke, was closed, or hit a device error while reading the row bytes.
Common situations: Cluster streaming where the peer node died or the network dropped; truncated/corrupt Kettle serialized file; concurrent closing of the input stream.
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
- : Unable to write value data to output stream
- ColumnExistsMeta.Exception.UnableToReadStepInfo
- CreditCardValidatorMeta.Exception.UnableToReadStepInfo
- CubeInputMeta.Exception.UnableToReadMetaData
- JsonOutput.Error.Writing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/028d1034dfba6188.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:2841
throw new KettleFileException( toString() + " : Unable to de-serialize data of type " + getType() );
}
case STORAGE_TYPE_BINARY_STRING:
return readBinaryString( inputStream );
case STORAGE_TYPE_INDEXED:
return readSmallInteger( inputStream ); // just an index: 4-bytes should
// be enough.
default:
throw new KettleFileException( toString() + " : Unknown storage type " + getStorageType() );
}
} catch ( EOFException e ) {
throw new KettleEOFException( e );
} catch ( SocketTimeoutException e ) {
throw e;
} catch ( IOException e ) {
throw new KettleFileException( toString() + " : Unable to read value data from input stream", e );
}
}
protected void writeString( DataOutputStream outputStream, String string ) throws IOException {
// Write the length and then the bytes
if ( string == null ) {
outputStream.writeInt( -1 );
} else {
byte[] chars = string.getBytes( Const.XML_ENCODING );
outputStream.writeInt( chars.length );
outputStream.write( chars );
}
}
protected void writeBinaryString( DataOutputStream outputStream, byte[] binaryString ) throws IOException {
// Write the length and then the bytes
if ( binaryString == null ) {
outputStream.writeInt( -1 );View on GitHub (pinned to f3058517a1)