pentaho/pentaho-kettle · error · KettleFileException

: Unable to read value timestamp data from input stream

Error message

 : Unable to read value timestamp data from input stream

What it means

Deserialization failure in ValueMetaTimestamp.readData(): reading timestamp data (millis, nanos, binary string or index) from the input stream failed. EOF is separately converted to KettleEOFException and socket timeouts have their own path; this message covers the remaining read errors, prefixed with the value's toString().

Solutions

  1. Check upstream socket/network stability if reading over a socket; SocketTimeoutException is propagated, not wrapped
  2. Verify the stream is not closed or truncated mid-row
  3. Ensure the writer finished writing all bytes of the timestamp value
Defensive patterns

Strategy: retry

Validate before calling

if (in.available() < 12) { throw new EOFException("Not enough bytes for Timestamp value"); }

Try / catch

try {
  value = valueMeta.readData(in);
} catch (KettleEOFException eof) {
  // normal end of stream
} catch (IOException e) {
  if (e.getCause() instanceof SocketTimeoutException) { reconnectAndRetry(); } else { throw e; }
}

Prevention

When it happens

Trigger: The 8-byte long millis and/or int nanos cannot be read from the stream due to IOException (stream closed, reset, socket issue, truncation mid-value).

Common situations: Network interruption during socket-based row streaming between transformation steps; premature close of FileInputStream on a serialized row file.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/72a894a30eb17344. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java:654

          Timestamp timestamp = new Timestamp( time );
          timestamp.setNanos( nanos );
          return timestamp;

        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 timestamp data from input stream", e );
    }
  }

  @Override
  public synchronized SimpleDateFormat getDateFormat() {
    return getDateFormat( getType() );
  }

  private synchronized SimpleDateFormat getDateFormat( int valueMetaType ) {
    if ( conversionMetadata != null ) {
      return new SimpleTimestampFormat( conversionMetadata.getDateFormat().toPattern() );
    }

    if ( dateFormat == null || dateFormatChanged ) {
      // This may not become static as the class is not thread-safe!
      dateFormat = new SimpleTimestampFormat( new SimpleDateFormat().toPattern() );

      String mask = getMask( valueMetaType );

View on GitHub (pinned to f3058517a1)