<?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: PublishKafkaRecord_0_10 1.2.0.3.0.1.1-5 Error: Unexpected Charter in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180774#M83157</link>
    <description>&lt;P&gt;I think in the controller service for Hortonworks Schema Registry the URL needs to be &lt;A href="http://localhost:7788/api/v1" target="_blank"&gt;http://localhost:7788/api/v1&lt;/A&gt;  where as in your screenshot it is missing the http://&lt;/P&gt;&lt;P&gt;Also if you can upgrade to HDF 3.2 there is an option in the writers to inherit the schema from the reader, so the writer doesn't even need to be configured with the schema registry, only the reader would need it.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Sep 2018 20:01:40 GMT</pubDate>
    <dc:creator>bbende</dc:creator>
    <dc:date>2018-09-06T20:01:40Z</dc:date>
    <item>
      <title>PublishKafkaRecord_0_10 1.2.0.3.0.1.1-5 Error: Unexpected Charter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180771#M83154</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am getting the below error when trying to pass a Json record into a Publish Kafka Record Process.&lt;/P&gt;&lt;PRE&gt;Unexpected character ('A'(code 65)): expected a vaild value (number, String, array, object, 'true','false' or 'null') at [source: java.io.stringReader@7070ee3e; line: 1, column: 2&lt;/PRE&gt;&lt;P&gt;See attached image &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/87562-error.png" target="_blank"&gt;error.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;P&gt;I am trying to pass the below Json File into the PublishKafkaRecord.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Json File&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{"storeId":"psi119745","dob":"20180905","printedCheckId":"90001","typeId":"212919","label":"Product A","id":"9437243","createdOn":"2018-09-05T04:20:49+12:00","quantity":1.0,"UniqueItemKey":"psi119745_20180905_90001_9437243"} &lt;/PRE&gt;&lt;P&gt;I have created a schema in the schema registry called AllItems with the below definition.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AllItems Schema&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
 "type": "record",
 "namespace": "AllItems.trans",
 "name": "AllItems",
 "fields": [
  {
   "name": "storeId",
   "type": "string"
  },
  {
   "name": "dob",
   "type": "string"
  },
  {
   "name": "printedCheckId",
   "type": "string"
  },
  {
   "name": "typeId",
   "type": "string"
  },
  {
   "name": "label",
   "type": "string"
  },
  {
   "name": "id",
   "type": "string"
  },
  {
   "name": "createdOn",
   "type": "string"
  },
   {
   "name": "quantity",
   "type": "double"
  },
    {
   "name": "UniqueItemKey",
   "type": "string"
  }
 ]
}&lt;/PRE&gt;&lt;P&gt;Nifi data flow &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Update Attributes &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;In this step I set the parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="87560-process-update-attributes-properties.png" style="width: 750px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19264i0FD2934B86CF9AC5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="87560-process-update-attributes-properties.png" alt="87560-process-update-attributes-properties.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="87559-nifiprocess.png" style="width: 365px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19265iA05B3A3D3AB6D60A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="87559-nifiprocess.png" alt="87559-nifiprocess.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;avro.schema = AllItems, kafka.topic = All_Items_Transactions and schema.name = AllItems&lt;/PRE&gt;&lt;P&gt;See attached image for properties &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/87550-process-update-attributes-properties.png" target="_blank"&gt;process-update-attributes-properties.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/87550-process-update-attributes-properties.png" target="_blank"&gt;&lt;/A&gt;&lt;STRONG&gt;2. PublishKafkaRecord&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="87561-process-publishkafkarecord-properties.png" style="width: 757px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19266iEE22D0611D2DA3AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="87561-process-publishkafkarecord-properties.png" alt="87561-process-publishkafkarecord-properties.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Topic Name = ${kafka.topic}, Record Reader = JsonTreeReader and Record Writer = AvroRecordSetWriter&lt;/PRE&gt;&lt;P&gt;see attached image for properites &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/87553-process-publishkafkarecord-properties.png" target="_blank"&gt;process-publishkafkarecord-properties.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;JsonTreeReader, AvroRecordSetWriter and HortonworksSchemaRegistry properties &lt;A href="https://community.cloudera.com/legacyfs/online/attachments/87563-serviceproperties.png" target="_blank"&gt;serviceproperties.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:06:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180771#M83154</guid>
      <dc:creator>TimManger</dc:creator>
      <dc:date>2019-08-18T09:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: PublishKafkaRecord_0_10 1.2.0.3.0.1.1-5 Error: Unexpected Charter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180772#M83155</link>
      <description>&lt;P&gt;The configuration of the reader and writer is not totally correct... you have selected the strategy as "Schema Text" which means the schema will come from the value of the "Schema Text" property which you then have set to the default value of ${avro.schema}, and then in UpdateAttribute you set avro.schema to "AllItems" so it is trying to parse the string "AllItems" into an Avro schema and failing because it is not a JSON schema.&lt;/P&gt;&lt;P&gt;If you want to use the "Schema Text" strategy then in UpdateAttribute the value of avro.schema needs to be the full text of your schema that you showed in your post.&lt;/P&gt;&lt;P&gt;If you want to use the schema from HWX schema registry, then the access strategy needs to be "Schema Name" and the "Schema Name" property needs to reference the name of the schema in the HWX schema registry (this part you already have setup correctly, so just changing the strategy should work).&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 02:44:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180772#M83155</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2018-09-06T02:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: PublishKafkaRecord_0_10 1.2.0.3.0.1.1-5 Error: Unexpected Charter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180773#M83156</link>
      <description>&lt;P&gt;Hi Bryan&lt;/P&gt;&lt;P&gt;Thank you for you help. I was getting confused between the different Schema Strategies and your explanation helped a lot. I tried altering the strategy to "Schema Name", but sadly this resulted in a different error &lt;/P&gt;&lt;PRE&gt;"Failed to determine schema for writing: connection refused". &lt;/PRE&gt;&lt;P&gt;I tried altering the HWX Schema registry and Kafka URLs, but without success. &lt;/P&gt;&lt;P&gt;I then decided to alter the UpdateAttribute process and set the avro.schema to the schema definition and used the strategy "Schema Text" and this worked. This will allow me to continue development and I shall look at implementing the "Schema Name" strategy at a later date.&lt;/P&gt;&lt;P&gt;Many thanks &lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 05:45:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180773#M83156</guid>
      <dc:creator>TimManger</dc:creator>
      <dc:date>2018-09-06T05:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: PublishKafkaRecord_0_10 1.2.0.3.0.1.1-5 Error: Unexpected Charter</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180774#M83157</link>
      <description>&lt;P&gt;I think in the controller service for Hortonworks Schema Registry the URL needs to be &lt;A href="http://localhost:7788/api/v1" target="_blank"&gt;http://localhost:7788/api/v1&lt;/A&gt;  where as in your screenshot it is missing the http://&lt;/P&gt;&lt;P&gt;Also if you can upgrade to HDF 3.2 there is an option in the writers to inherit the schema from the reader, so the writer doesn't even need to be configured with the schema registry, only the reader would need it.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 20:01:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/PublishKafkaRecord-0-10-1-2-0-3-0-1-1-5-Error-Unexpected/m-p/180774#M83157</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2018-09-06T20:01:40Z</dc:date>
    </item>
  </channel>
</rss>

