[ https://issues.apache.org/jira/browse/NIFI-7917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223658#comment-17223658 ]
Matt Burgess commented on NIFI-7917: ------------------------------------ This is a duplicate of NIFI-7882, but with a different fix. NIFI-7882 proposes to patch the NiFi code without upgrading Avro, and this one proposes to upgrade Avro. > Upgrade avro to 1.10 in > nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services > -------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NIFI-7917 > URL: https://issues.apache.org/jira/browse/NIFI-7917 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Denes Arvay > Assignee: Denes Arvay > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > When trying to convert an avro record with ConvertRecord processor I bumped > into the following exception: > {code:java} > 2020-10-12 15:04:57,017 ERROR [Timer-Driven Process Thread-1] > o.a.n.processors.standard.ConvertRecord > ConvertRecord[id=1e2b99d5-0175-1000-531f-0cf5a5ae8490] Failed to process > StandardFlowFileRecord[uuid=6b7d3df3-fc7d-4606-acfe-87fcafcdebc9,claim=StandardContentClaim > [resourceClaim=StandardResourceClaim[id=1602529363240-1, container=default, > section=1], offset=656, > length=332],offset=0,name=avro_test_29092020104944.avro,size=332]; will route > to failure: org.apache.avro.file.DataFileWriter$AppendWriteException: > org.apache.avro.AvroRuntimeException: Unknown datum type > org.apache.avro.JsonProperties$Null: > org.apache.avro.JsonProperties$Null@24418f28 > org.apache.avro.file.DataFileWriter$AppendWriteException: > org.apache.avro.AvroRuntimeException: Unknown datum type > org.apache.avro.JsonProperties$Null: > org.apache.avro.JsonProperties$Null@24418f28 > at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:308) > at > org.apache.nifi.avro.WriteAvroResultWithSchema.writeRecord(WriteAvroResultWithSchema.java:61) > at > org.apache.nifi.serialization.AbstractRecordSetWriter.write(AbstractRecordSetWriter.java:59) > at > org.apache.nifi.processors.standard.AbstractRecordProcessor$1.process(AbstractRecordProcessor.java:153) > at > org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2887) > at > org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:122) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162) > at > org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:209) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117) > at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > Caused by: org.apache.avro.AvroRuntimeException: Unknown datum type > org.apache.avro.JsonProperties$Null: > org.apache.avro.JsonProperties$Null@24418f28 > at > org.apache.avro.generic.GenericData.getSchemaName(GenericData.java:741) > at > org.apache.avro.generic.GenericData.resolveUnion(GenericData.java:706) > at > org.apache.avro.generic.GenericDatumWriter.resolveUnion(GenericDatumWriter.java:192) > at > org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:110) > at > org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73) > at > org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:153) > at > org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:143) > at > org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:105) > at > org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73) > at > org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60) > at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:302) > ... 17 common frames omitted > {code} > This is caused by AVRO-1954 which has been fixed in avro 1.9. > I'd suggest upgrading the avro version in the > {{org.apache.nifi.avro.WriteAvroResultWithSchema}}'s module > (\{{nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services}}) > to the latest avro (1.10.0). Currently 1.8.1 is in use. -- This message was sent by Atlassian Jira (v8.3.4#803005)