{"record":{"id":"72a894a30eb17344","repo":"pentaho/pentaho-kettle","slug":"unable-to-read-value-timestamp-data-from-input-stream","errorCode":null,"errorMessage":" : Unable to read value timestamp data from input stream","messagePattern":" : Unable to read value timestamp data from input stream","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java","lineNumber":654,"sourceCode":"          Timestamp timestamp = new Timestamp( time );\n          timestamp.setNanos( nanos );\n          return timestamp;\n\n        case STORAGE_TYPE_BINARY_STRING:\n          return readBinaryString( inputStream );\n\n        case STORAGE_TYPE_INDEXED:\n          return readSmallInteger( inputStream ); // just an index: 4-bytes should be enough.\n\n        default:\n          throw new KettleFileException( toString() + \" : Unknown storage type \" + getStorageType() );\n      }\n    } catch ( EOFException e ) {\n      throw new KettleEOFException( e );\n    } catch ( SocketTimeoutException e ) {\n      throw e;\n    } catch ( IOException e ) {\n      throw new KettleFileException( toString() + \" : Unable to read value timestamp data from input stream\", e );\n    }\n  }\n\n  @Override\n  public synchronized SimpleDateFormat getDateFormat() {\n    return getDateFormat( getType() );\n  }\n\n  private synchronized SimpleDateFormat getDateFormat( int valueMetaType ) {\n    if ( conversionMetadata != null ) {\n      return new SimpleTimestampFormat( conversionMetadata.getDateFormat().toPattern() );\n    }\n\n    if ( dateFormat == null || dateFormatChanged ) {\n      // This may not become static as the class is not thread-safe!\n      dateFormat = new SimpleTimestampFormat( new SimpleDateFormat().toPattern() );\n\n      String mask = getMask( valueMetaType );","sourceCodeStart":636,"sourceCodeEnd":672,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java#L636-L672","documentation":"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().","triggerScenarios":"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).","commonSituations":"Network interruption during socket-based row streaming between transformation steps; premature close of FileInputStream on a serialized row file.","solutions":["Check upstream socket/network stability if reading over a socket; SocketTimeoutException is propagated, not wrapped","Verify the stream is not closed or truncated mid-row","Ensure the writer finished writing all bytes of the timestamp value"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (in.available() < 12) { throw new EOFException(\"Not enough bytes for Timestamp value\"); }","typeGuard":null,"tryCatchPattern":"try {\n  value = valueMeta.readData(in);\n} catch (KettleEOFException eof) {\n  // normal end of stream\n} catch (IOException e) {\n  if (e.getCause() instanceof SocketTimeoutException) { reconnectAndRetry(); } else { throw e; }\n}","preventionTips":["Keep streams open until all rows are consumed","Increase socket timeouts for large transfers","Verify producer/consumer row metadata match"],"tags":["io","serialization","stream"],"backgroundTag":"file-read-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}