{"record":{"id":"a8bc83f225ba933b","repo":"pentaho/pentaho-kettle","slug":"avroinput-error-objectreaderror","errorCode":null,"errorMessage":"AvroInput.Error.ObjectReadError","messagePattern":"AvroInput\\.Error\\.ObjectReadError","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/avro-format/core/src/main/java/org/pentaho/di/trans/steps/avro/input/AvroNestedReader.java","lineNumber":1450,"sourceCode":"            // special case for top-level record. In case we actually\n            // have a top level union, reassign the record so that\n            // we have the correctly populated object in the case\n            // where our last record instance can't be reused (i.e.\n            // the next record read is a different one from the union\n            // than the last one).\n            m_topLevelRecord = (GenericData.Record) m_containerReader.next( m_topLevelRecord );\n          } else if ( m_topLevelArray != null ) {\n            m_containerReader.next( m_topLevelArray );\n          } else {\n            m_containerReader.next( m_topLevelMap );\n          }\n\n          return setKettleFields( incoming, space );\n        } else {\n          return null; // no more input\n        }\n      } catch ( IOException e ) {\n        throw new KettleException( BaseMessages\n          .getString( PKG, \"AvroInput.Error.ObjectReadError\" ) );\n      }\n    } else {\n      // non-container file\n      try {\n        /*\n         * if (m_decoder.isEnd()) { return null; }\n         */\n\n        // reading from an incoming field\n        if ( m_decodingFromField ) {\n          if ( incoming == null || incoming.length == 0 ) {\n            // must be done - just return null\n            return null;\n          }\n          ValueMetaInterface fieldMeta = m_incomingRowMeta.getValueMeta( m_fieldToDecodeIndex );\n\n          // incoming avro field null? - all decoded fields are null","sourceCodeStart":1432,"sourceCodeEnd":1468,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/avro-format/core/src/main/java/org/pentaho/di/trans/steps/avro/input/AvroNestedReader.java#L1432-L1468","documentation":"While reading the next record from an Avro container (Object Container File) via DataFileReader, an IOException occurred. AvroNestedReader wraps it in a KettleException with this generic 'object read error' message, dropping the underlying cause details from the user-visible message.","triggerScenarios":"m_containerReader.next(...) or hasNext() throws IOException inside avroObjectToKettle — corrupt/truncated container file, sync-marker mismatch, or I/O error on the underlying stream.","commonSituations":"Partially transferred or truncated .avro files; files corrupted in transit; network/permission failures mid-read from remote VFS locations; Avro writer version producing blocks the reader cannot decode.","solutions":["Check the full stack trace/cause for the underlying IOException (file system error vs decode error).","Re-transfer or regenerate the Avro container file; validate with avro-tools (e.g. getfilemeta / tojson).","Confirm read permissions and stable connectivity if the file is on a remote/VFS location.","Verify the file was produced by a compatible Avro version and not truncated (compare checksums)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  rows = reader.avroObjectToKettle(row, space);\n} catch (KettleException e) {\n  if (e.getCause() instanceof IOException) { log(\"container read failed\", e.getCause()); retryOrAbort(); } else throw e;\n}","preventionTips":["Verify .avro file integrity (checksum) before processing.","Validate container files with avro-tools getfilemeta.","Avoid reading remote files over unstable connections; copy locally first."],"tags":["avro","io","file-read","container-file"],"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"}