<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398376#M250173</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;, Thanks for you reply, infact i've asked from Kafka side itself not to send Null values, that sorted issue.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 17:21:02 GMT</pubDate>
    <dc:creator>PradNiFi1236</dc:creator>
    <dc:date>2024-12-03T17:21:02Z</dc:date>
    <item>
      <title>Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398041#M250042</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im getting below error&amp;nbsp; after new fileds are being added to the payload from Kafka&lt;BR /&gt;OpenTX, datatype: double precision&lt;BR /&gt;charges, Datatype: string&lt;/P&gt;&lt;P&gt;note:before these 2 fields added to the payload its working fine with existing json reader and writer&lt;/P&gt;&lt;P&gt;Error:&lt;BR /&gt;05:25:40 UTCERRORConsumeKafkaRecord_2_6[id=8f8pq352c-0rcb] Failed to parse message from Kafka using the configured Record Reader. Will route message as its own FlowFile to the 'parse.failure' relationship: org.apache.nifi.serialization.MalformedRecordException: Successfully parsed a JSON object from input but failed to convert into a Record object with the given schema&lt;BR /&gt;- Caused by: org.apache.nifi.serialization.record.util.IllegalTypeConversionException: Cannot convert value [[Ljava.lang.Object;@6b9b8a0c] of type class [Ljava.lang.Object; for field invoiceLineList.ecoTaxValues to any of the following available Sub-Types for a Choice: [ARRAY[STRING], ARRAY[DOUBLE]]&lt;BR /&gt;&lt;BR /&gt;input payload:&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"Identifier":"123456",&lt;BR /&gt;"creationDate":"2024-11-22T12:22:01.331894Z",&lt;BR /&gt;"docType":"01",&lt;BR /&gt;"currency":"INR",&lt;BR /&gt;"taxCode": [null,null,null,"04",null,null,null,null,null],&lt;BR /&gt;"invoiceLineList": [&lt;BR /&gt;{&lt;BR /&gt;"line":1,&lt;BR /&gt;"charges":["009",null,null],&lt;BR /&gt;"OpenTX": [0.3,0.9,null,null]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"line":2,&lt;BR /&gt;"charges":["002",null,null],&lt;BR /&gt;"OpenTX": [0.1,1.9,null,null]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;below are the json reader and writer configs.&lt;BR /&gt;JSONTreeReader:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PradNiFi1236_0-1732645858110.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42808i7D051135C5715126/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PradNiFi1236_0-1732645858110.png" alt="PradNiFi1236_0-1732645858110.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;JSONrecordSETWriter&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PradNiFi1236_1-1732645914350.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42809i6FA28B16FB4A50DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PradNiFi1236_1-1732645914350.png" alt="PradNiFi1236_1-1732645914350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;i've tried changing reader to AVRO reader using&amp;nbsp;&lt;SPAN&gt;"Confluent Content-Encoded Schema Reference" in the Avro Reader "Schema Access Strategy" field and keeping JsonRecordsetwriter same as above but still its not working,&lt;BR /&gt;&lt;BR /&gt;Can anyone help me here?&lt;BR /&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 19:05:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398041#M250042</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2024-11-26T19:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398043#M250044</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99104"&gt;@PradNiFi1236&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;How are you adding the new fields? You Json appears to be invalid as provided.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 18:57:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398043#M250044</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-11-26T18:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398044#M250045</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;, sorry for the earlier input , ive udpated now. this payload coming from Kafka by the way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 19:07:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398044#M250045</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2024-11-26T19:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398045#M250046</link>
      <description>&lt;P&gt;Can you provide more information on your dataflow ? let's say you are using GenerateFlowFile to create the json Kafka output, what happens next? How are you enriching the data and what kind of processor where you are using the json reader\writer service that is causing the error? I need to see the full picture here because When I use same&amp;nbsp; json you provided in GenerateFlowFile processor and then passed it to QueryRecord with the same Json reader\writer service configuration, it seems to be working!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 19:37:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398045#M250046</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-11-26T19:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398152#M250114</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;, yeah from generate flow file there is no issue.its processing fine using QueryRecord.&lt;BR /&gt;&lt;BR /&gt;here the file coming From Kafkatopic , so we are using consumeKafka as top processor, there itself we are having parsefailures. there is no schema from kafka also we are inferring that schema whatever file coming,&lt;/P&gt;&lt;P&gt;if you read the error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PradNiFi1236_0-1732717247389.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42821iF5D28896A4A71570/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PradNiFi1236_0-1732717247389.png" alt="PradNiFi1236_0-1732717247389.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;its taking this value ecoTaxValues , in payload i mentioned as&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;"OpenTX": [0.1,1.9,null,null]&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;values considering as double and null values considering as string, that's causing issue,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is there any way from json/avro reader from consumekafka we can skip this or ignoring these nulls, other than writing avro schema. why because we have so many fields in actual payload thats why, and if any new field addition from source i need to adpat the field again at our schema, so to avoid that i'm trying, Could you please help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 14:28:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398152#M250114</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2024-11-27T14:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398155#M250115</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It still not clear to me what is exactly happening and where. The error message states a field called ecoTaxValues&amp;nbsp; which doesnt seem to exist in the provided input. You also mentioned that you are using ConsumeKafka and getting an error there through reader\write while the consumeKafka processor doesnt take any reader\writer service. The consumeKafkaRecord does....is that what you are using? Please be specific when describing the problem as much as you can. If you cant share the information for security reason then I would recommend you try to reproduce using sample data and dataflow to make it easier to isolate the error. Also please share screenshot\accurate description of the dataflow since the inception of the input and share the processor configurations as well as any services that are being used.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 15:18:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398155#M250115</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-11-27T15:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to parse message from Kafka nifi.serialization.MalformedRecordException</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398376#M250173</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;, Thanks for you reply, infact i've asked from Kafka side itself not to send Null values, that sorted issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 17:21:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Failed-to-parse-message-from-Kafka-nifi-serialization/m-p/398376#M250173</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2024-12-03T17:21:02Z</dc:date>
    </item>
  </channel>
</rss>

