Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2191

Reuse of AVRO Schema - Not working with Confluent Registry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.8.2
    • None
    • java
    • Schema, Import, Imports, Importing, Types, Reuse, Share, Inherit Schema

    Description

      As shown in Jira AVRO-1188 its working till we compile using Maven as shown in issue, but it is not working when we run created jar file.

       

      It gives run time error as Undefined Name : "com.test.Nameid"

       

      after looking in to the code it throws error in parsing the Schema at org.apache.avro.Schema : static Schema parse(JsonNode schema, Names names) { : as it gives the result as null (result = names.get(schema.getTextValue())

       

      I am not sure what is the problem, it must work as expected but for some reason it did not parsed the schema if it uses any other schema

       

      Below is the example file where I am getting error

       

      nameid.avsc

      { "namespace" : "com.test", "type" : "record", "name" : "Nameid", "fields" : [

      {"name":"id","type":"double"}

      ,
      {"name":"name","type":"string"}
      ]
      }

       

      research.avsc

      { "namespace" : "com.test", "type" : "record", "name" : "Research", "fields" : [

      {"name":"id","type":"string"}

      ,

      {"name":"Nameid", "type": ["com.test.Nameid"]}

      ,
      {"name":"content_type","type":"string"}
      ]
      }

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            huzaifa Huzaifa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: