pentaho/pentaho-kettle · error · org.pentaho.di.core.exception.KettleFileException
: Unable to read row metadata from input stream
Error message
${toString()} : Unable to read row metadata from input stream What it means
In the RowMeta(InputStream) constructor loop, any non-EOF exception while reading a field type, creating the value meta, or reading its metadata is wrapped in KettleFileException "<rowMeta.toString()> : Unable to read row metadata from input stream". This covers both I/O faults and value-meta creation failures (e.g. unknown value type id) during field deserialization.
Solutions
- Enable a debug log on the stream to dump raw bytes and confirm byte alignment/format of the metadata.
- Align PDI versions between sender and receiver so all value type ids are supported.
- Ensure all value-type plugins are installed so createValueMeta can resolve every type id.
- Re-transmit the metadata if the stream is corrupted.
Example fix
// before
RowMeta rowMeta = new RowMeta(inputStream);
// after
try {
RowMeta rowMeta = new RowMeta(inputStream);
} catch (KettleFileException e) {
log.error("Row metadata read failed: " + e.getMessage(), e);
verifySenderVersionMatches();
inputStream = reconnect();
RowMeta rowMeta = new RowMeta(inputStream);
} Defensive patterns
Strategy: validation
Validate before calling
byte[] raw = readAllBytes(inputStream); // verify declared field count matches parseable content before constructing RowMeta RowMeta rowMeta = new RowMeta(new ByteArrayInputStream(raw));
Try / catch
try {
RowMeta rowMeta = new RowMeta(inputStream);
} catch (KettleFileException e) {
log.error("Field-level metadata read failed: " + e.getMessage(), e);
verifySenderPdiVersion();
ensureValueMetaPluginsInstalled();
} Prevention
- Install all value-type plugins so unknown type ids never reach createValueMeta.
- Match sender/receiver PDI versions.
- Buffer and validate raw bytes before parsing to isolate corruption.
When it happens
Trigger: new RowMeta(inputStream) where ValueMetaFactory.createValueMeta(type) fails on an unknown/unsupported type id, readMetaData throws, or a non-EOF IOException occurs while reading a field.
Common situations: Reading metadata serialized by a newer PDI version with value types the current version does not know; corrupted stream bytes shifting type ids; missing value-type plugin jars.
Related errors
- End of file while reading the number of metadata values in…
- Unable to read nr of metadata values
- End of file reached
- End of file reached while reading value
- Error de-serializing row of data from byte array
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/dfeb632a6a338f2f.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/RowMeta.java:742
} catch ( SocketTimeoutException e ) {
throw e;
} catch ( EOFException e ) {
throw new KettleEOFException(
"End of file while reading the number of metadata values in the row metadata", e );
} catch ( IOException e ) {
throw new KettleFileException( "Unable to read nr of metadata values: " + e.toString(), e );
}
for ( int i = 0; i < nr; i++ ) {
try {
int type = inputStream.readInt();
ValueMetaInterface valueMeta = ValueMetaFactory.createValueMeta( type );
valueMeta.readMetaData( inputStream );
addValueMeta( valueMeta );
} catch ( EOFException e ) {
throw new KettleEOFException( e );
} catch ( Exception e ) {
throw new KettleFileException( toString() + " : Unable to read row metadata from input stream", e );
}
}
}
@Override
public Object[] readData( DataInputStream inputStream ) throws KettleFileException, SocketTimeoutException {
lock.readLock().lock();
try {
Object[] data = new Object[ size() ];
for ( int i = 0; i < size(); i++ ) {
data[ i ] = getValueMeta( i ).readData( inputStream );
}
if ( size() == 0 ) {
try {
inputStream.readBoolean();
} catch ( EOFException e ) {
throw new KettleEOFException( e );View on GitHub (pinned to f3058517a1)