pentaho/pentaho-kettle · error · java.lang.RuntimeException
Error de-serializing row of data from byte array
Error message
Error de-serializing row of data from byte array
What it means
RowMeta.getRow(RowMetaInterface, byte[]) deserializes a byte[] back into an Object[] row. Any exception during metadata.readData (truncated/corrupt data, format mismatch) is wrapped in a RuntimeException with this message, keeping the original as cause.
Solutions
- Verify the byte[] was produced by RowMeta.getData() with an identical RowMetaInterface layout
- Check e.getCause() (often EOFException or KettleFileException) for the exact read failure
- Ensure all nodes/steps run the same PDI version
- Re-serialize the data from the original source instead of reusing stale bytes
Example fix
// before Object[] row = RowMeta.getRow(otherMeta, storedBytes); // meta differs from producer // after Object[] row = RowMeta.getRow(producerMeta, storedBytes); // use the same meta used to serialize
Defensive patterns
Strategy: try-catch
Validate before calling
// Java: only deserialize bytes produced by RowMeta.getData with the same meta
if (data == null || data.length == 0) throw new IllegalArgumentException("empty payload");
// compare layout checksums if you store them alongside the payload Try / catch
try {
Object[] row = RowMeta.getRow(meta, data);
} catch (RuntimeException e) {
Throwable cause = e.getCause(); // usually EOFException / KettleFileException
throw new IllegalStateException("Row deserialization failed: " + cause, cause);
} Prevention
- Never reuse stale serialized bytes after changing the row layout
- Include the RowMeta (or its XML) alongside stored binary rows
- Pin the same PDI version on all cluster nodes
- Round-trip test serialize->deserialize in CI when relying on binary row format
When it happens
Trigger: Calling RowMeta.getRow() with a byte[] that was not produced by the matching RowMeta.getData() (different row layout, truncated buffer, wrong serialization version).
Common situations: Replaying stored binary payloads after the row structure changed; mixing cluster nodes on different Kettle versions; manually editing or truncating serialized rows.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
- BaseStep.SafeMode.Exception.DoubleFieldnames
- BaseStep.SafeMode.Exception.MixingLayout
- BaseStep.SafeMode.Exception.MixingStorageTypes
- BaseStep.SafeMode.Exception.MixingTypes
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/78b7a69826a70169.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/RowMeta.java:1147
} catch ( Exception e ) {
throw new RuntimeException( "Error serializing row to byte array", e );
}
}
/**
* Create a row of data bases on a serialized format (byte[])
*
* @param data the serialized data
* @param metadata the metadata to use
* @return a new row of data
*/
public static Object[] getRow( RowMetaInterface metadata, byte[] data ) {
try {
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( data );
DataInputStream dataInputStream = new DataInputStream( byteArrayInputStream );
return metadata.readData( dataInputStream );
} catch ( Exception e ) {
throw new RuntimeException( "Error de-serializing row of data from byte array", e );
}
}
public static Row createOriginalRow( RowMetaInterface rowMeta, Object[] rowData ) throws KettleValueException {
Row row = new Row();
for ( int i = 0; i < rowMeta.size(); i++ ) {
ValueMetaInterface valueMeta = rowMeta.getValueMeta( i );
Object valueData = rowData[ i ];
Value value = valueMeta.createOriginalValue( valueData );
row.addValue( value );
}
return row;
}
/**View on GitHub (pinned to f3058517a1)