Yeah, a library conflict could cause this. The problem is that Avro was not able to load and instantiate the `ManifestFile` class, so it fell back to its generic `Record` class.
On Thu, Dec 5, 2019 at 11:30 AM Xingyuan Lin <[email protected]> wrote: > Never mind, it was probably because a wrong runtime library was used > > > > *From: *Xingyuan Lin <[email protected]> > *Date: *Wednesday, December 4, 2019 at 4:56 PM > *To: *"[email protected]" <[email protected]> > *Subject: *An exception is thrown when calling > snapshot.manifests().forEach() > > > > Hi Iceberg team, > > > > I’m encountering a weird error which throws an exception as the following: > > java.lang.ClassCastException: org.apache.avro.generic.GenericData$Record > cannot be cast to org.apache.iceberg.ManifestFile > > > > The code snippet which causes it is: > > List<ManifestFile> manifestFiles = snapshot.manifests(); > > *for* (ManifestFile manifestFile : manifestFiles) { > > ... > > } > > > > Do you have a rough idea about what’s probably going on? > > > > Thank you in advance, > > Xingyuan > -- Ryan Blue Software Engineer Netflix
