Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.10.0
-
None
-
None
-
.net core 3.1
Windows 10
Description
Below Error we are getting at last line
var dataFileReader = Avro.File.DataFileReader<avroclass>.OpenReader(stream);
while (dataFileReader.HasNext())
{ var genRec = dataFileReader.Next(); }
Avro.AvroRuntimeException
HResult=0x80131500
Message=Error fetching next object from block: Avro.AvroException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') in field DESC_LONG
---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Avro.UnionSchema.get_Item(Int32 index)
at Avro.Generic.DefaultReader.ReadUnion(Object reuse, UnionSchema writerSchema, Schema readerSchema, Decoder d)
at Avro.Generic.DefaultReader.Read(Object reuse, Schema writerSchema, Schema readerSchema, Decoder d)
at Avro.Generic.DefaultReader.ReadRecord(Object reuse, RecordSchema writerSchema, Schema readerSchema, Decoder dec)
— End of inner exception stack trace —
at Avro.Generic.DefaultReader.ReadRecord(Object reuse, RecordSchema writerSchema, Schema readerSchema, Decoder dec)
at Avro.Generic.DefaultReader.Read(Object reuse, Schema writerSchema, Schema readerSchema, Decoder d)
at Avro.Generic.DefaultReader.Read[T](T reuse, Decoder decoder)
at Avro.Generic.GenericReader`1.Read(T reuse, Decoder d)
at Avro.File.DataFileReader`1.Next(T reuse)
Source=Avro
StackTrace:
at Avro.File.DataFileReader`1.Next(T reuse)
at Avro.File.DataFileReader`1.Next()
at CCC.CAS.ReferenceMessages.AvroBuilder.ReadAvro(Dictionary`2 avroDict, Stream stream, iAvroFileMaper mapper) in C:\dev\CAS-Common-Reliance\src\CCC.CAS.ReferenceMessages\AvroCodeLookupRepository.cs:line 186
at CCC.CAS.ReferenceMessages.AvroBuilder.BuildAvroLookUpDictionary(String baseUri, String[] pathStrings) in C:\dev\CAS-Common-Reliance\src\CCC.CAS.ReferenceMessages\AvroCodeLookupRepository.cs:line 239
at CCC.CAS.ReferenceMessages.AvroBuilder..ctor(String baseUri, String[] pathStrings) in C:\dev\CAS-Common-Reliance\src\CCC.CAS.ReferenceMessages\AvroCodeLookupRepository.cs:line 141
at CCC.CAS.ReferenceMessages.AvroCodeLookupRepository..ctor(String baseUri, String[] pathStrings) in C:\dev\CAS-Common-Reliance\src\CCC.CAS.ReferenceMessages\AvroCodeLookupRepository.cs:line 30
at ReferenceRepoTest.Program.Main(String[] args) in C:\dev\CAS-Common-Reliance\src\ReferenceRepoTest\Program.cs:line 11