org.apache.avro.AvroTypeException: Found { "type" : "record", "name" : "Employee", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "salary", "type" : "int" }, { "name" : "department", "type" : [ "string", "null" ] } ] }, expecting { "type" : "record", "name" : "Person", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "age", "type" : "int" }, { "name" : "siblingnames", "type" : { "type" : "array", "items" : "string" } } ] }

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via incubator-crunch-user by Micah Whitacre, 1 year ago
", "type" : [ "string", "null" ] } ] }, expecting { "type" : "record", "name" : "Person", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "age", "type" : "int" }, { "name" : "siblingnames", "type" : { "type" : "array", "items" : "string" } } ] }
via incubator-crunch-user by Micah Whitacre, 1 year ago
", "type" : [ "string", "null" ] } ] }, expecting { "type" : "record", "name" : "Person", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "age", "type" : "int" }, { "name" : "siblingnames", "type" : { "type" : "array", "items" : "string" } } ] }
via GitHub by elibingham
, 2 years ago
Found { SCHEMA OF FOO }, expecting { SCHEMA OF BAR }
via GitHub by moradology
, 1 year ago
Found geotrellis.raster.ByteArrayTile, expecting geotrellis.raster.ArrayMultibandTile, missing required field bands
via avro-user by Francois Forster, 1 year ago
" }, { "name" : "isFeatured", "type" : "boolean" } ] }, expecting [ "null", { "type" : "record", "name" : "Result", "namespace" : "v1", "fields" : [ { "name" : "id", "type" : "string" }, { "name" : "text", "type" : "string" }, { "name" : "isRecommended", "type" : "boolean" } ] } ]
org.apache.avro.AvroTypeException: Found { "type" : "record", "name" : "Employee", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "salary", "type" : "int" }, { "name" : "department", "type" : [ "string", "null" ] } ] }, expecting { "type" : "record", "name" : "Person", "namespace" : "org.apache.crunch.test", "fields" : [ { "name" : "name", "type" : [ "string", "null" ] }, { "name" : "age", "type" : "int" }, { "name" : "siblingnames", "type" : { "type" : "array", "items" : "string" } } ] }
at org.apache.avro.io.ResolvingDecoder.doAction(ResolvingDecoder.java:231)
at org.apache.avro.io.parsing.Parser.advance(Parser.java:88)
at org.apache.avro.io.ResolvingDecoder.readFieldOrder(ResolvingDecoder.java:127)
at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:169)
at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:144)
at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:135)
at org.apache.avro.file.DataFileStream.next(DataFileStream.java:233)
at org.apache.crunch.types.avro.AvroRecordReader.nextKeyValue(AvroRecordReader.java:83)
at org.apache.crunch.impl.mr.run.CrunchRecordReader.nextKeyValue(CrunchRecordReader.java:72)
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:458)
at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:76)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:85)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:139)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:645)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:325)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.