Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 230E0200CED for ; Fri, 4 Aug 2017 05:19:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 219C916CFA9; Fri, 4 Aug 2017 03:19:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6858016CFA6 for ; Fri, 4 Aug 2017 05:19:01 +0200 (CEST) Received: (qmail 2365 invoked by uid 500); 4 Aug 2017 03:19:00 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Delivered-To: moderator for dev@nifi.apache.org Received: (qmail 91681 invoked by uid 99); 4 Aug 2017 03:10:23 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.919 X-Spam-Level: X-Spam-Status: No, score=0.919 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_FAIL=0.919] autolearn=disabled Date: Thu, 3 Aug 2017 20:10:20 -0700 (MST) From: Frederik To: dev@nifi.apache.org Message-ID: <1501816220355-16574.post@n7.nabble.com> Subject: Avro Reader reading from FlowFile throws SchemaNotFoundException MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Fri, 04 Aug 2017 03:19:02 -0000 Hi, I created a FlowFile with QueryDataBaseTable and want to convert this straight to CSV via the ConvertRecord processor. I tried the AvroReader with the following Schema Access Strategies 1. Use Embedded Avro Schema 2. Use 'Schema Text' Property and Schema Text set to ${avro.schema} My FlowFile has the following start structure. Obj^A^B^Vavro.schema<8a>^B{"type":"record","name":"customer_crm_summary","namespace":"any.data","fields":[{"name":"device_tac_code","type":["null","string"]}]} I would think this seems all ok but the the AvroReader fails with the Exception below SchemaNotFoundException I tested this with Nifi 1.2 and 1.3 Any ideas on what this could be? thanks 2017-08-04 14:41:45,236 ERROR [Timer-Driven Process Thread-1] o.a.n.processors.standard.ConvertRecord ConvertRecord[id=ab1cb1cb-015d-1000-4818-59412b1f3b2b] Failed to process records for StandardFlowFileRecord[uuid=6019524b-c23e-4b5f-977c-8be056aa217f,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1501814390874-1, container=default, section=1], offset=0, length=4090093],offset=0,name=7952490691251418,size=4089924]; will route to failure: org.apache.nifi.schema.access.SchemaNotFoundException: FlowFile did not contain appropriate attributes to determine Schema Text org.apache.nifi.schema.access.SchemaNotFoundException: FlowFile did not contain appropriate attributes to determine Schema Text at org.apache.nifi.schema.access.AvroSchemaTextStrategy.getSchema(AvroSchemaTextStrategy.java:46) at org.apache.nifi.serialization.SchemaRegistryService.getSchema(SchemaRegistryService.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89) at com.sun.proxy.$Proxy121.getSchema(Unknown Source) at org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:106) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120) at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-08-04 14:41:45,243 ERROR [Timer-Driven Process Thread-1] o.a.n.processors.standard.ConvertRecord ConvertRecord[id=ab1cb1cb-015d-1000-4818-59412b1f3b2b] Failed to process records for StandardFlowFileRecord[uuid=1414d8a0-c033-4d8d-b2a3-944c6124894f,cl -- View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Avro-Reader-reading-from-FlowFile-throws-SchemaNotFoundException-tp16574.html Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.