pentaho/pentaho-kettle · error · KettleFileException
: Unable to write value timestamp data to output stream
Error message
: Unable to write value timestamp data to output stream
What it means
Serialization failure in ValueMetaTimestamp.writeData(): writing the timestamp value to the output data stream failed (e.g. an I/O error or null stream while writing millis/nanos or a binary-string/indexed representation). Prefixed with this value's toString(); related ClassCastException and EOF paths are handled by adjacent catch blocks.
Solutions
- Check the chained IOException cause (disk full, broken pipe, permission)
- Verify free disk space and that the output file/stream is writable
- Reopen the output stream and retry the batch
- For network streams, add retry/restart logic on the step
Example fix
// before
DataOutputStream out = new DataOutputStream(new FileOutputStream(file));
meta.writeData(out, object); // fails if disk full / stream closed
// after
try (DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file, true)))) {
meta.writeData(out, object);
out.flush();
} catch (KettleFileException e) {
checkDiskSpaceAndRetry(file, object);
} Defensive patterns
Strategy: retry
Validate before calling
File f = new File(path);
if (f.getUsableSpace() < minRequiredBytes) throw new IOException("Insufficient disk space for row output");
if (!f.canWrite()) throw new IOException("Output file not writable: " + path); Try / catch
try {
meta.writeData(outputStream, object);
} catch (KettleFileException e) {
if (e.getCause() instanceof IOException) {
reopenStream();
meta.writeData(outputStream, object); // retry once
} else throw e;
} Prevention
- Monitor free disk space on output targets
- Use buffered streams and flush/verify after batches
- Handle broken pipes on clustered slave connections with reconnect logic
- Keep output directories writable by the executing user
When it happens
Trigger: Writing binary row data to a file/socket stream that is closed, full disk, broken pipe on a clustered slave connection, or permission loss mid-write.
Common situations: Disk full on large table-output-to-file jobs, network drops during clustered streaming, writing to removable media that disconnected.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- : Unknown storage type " + getStorageType()
- Cannot open control file
- Cannot open data file
- CubeInputMeta.Exception.ErrorOpeningOrReadingCubeFile
- CubeInputMeta.Exception.UnableToCloseCubeFile
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d9e01d6cdc2d0970.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java:614
// at all.
//
writeBinaryString( outputStream, (byte[]) object );
break;
case STORAGE_TYPE_INDEXED:
writeInteger( outputStream, (Integer) object ); // just an index
break;
default:
throw new KettleFileException( toString() + " : Unknown storage type " + getStorageType() );
}
}
} catch ( ClassCastException e ) {
throw new RuntimeException( toString() + " : There was a data type error: the data type of "
+ object.getClass().getName() + " object [" + object + "] does not correspond to value meta ["
+ toStringMeta() + "]" );
} catch ( IOException e ) {
throw new KettleFileException( toString() + " : Unable to write value timestamp data to output stream", e );
} catch ( KettleValueException e ) {
throw new RuntimeException( toString() + " : There was a data type error: the data type of "
+ object.getClass().getName() + " object [" + object + "] does not correspond to value meta ["
+ toStringMeta() + "]" );
}
}
@Override
public Object readData( DataInputStream inputStream ) throws KettleFileException, KettleEOFException,
SocketTimeoutException {
try {
// Is the value NULL?
if ( inputStream.readBoolean() ) {
return null; // done
}
switch ( storageType ) {
case STORAGE_TYPE_NORMAL:View on GitHub (pinned to f3058517a1)