Skip to content

Unable to generate Java from multi avsc #239

@jgordijn

Description

@jgordijn

I have a Jar with multiple AVSC files. These were generated from AVDL files. For example:

@namespace("com.example")
protocol MyProtocol {

  record Metadata {
    string sender;
  }

  record MyRecord {
    Metadata metadata;
    string name;
    int age;
  }

  record MyRecord2 {
    Metadata metadata;
    string country;
  }
  
}

This will generate 2 AVSC files, which both contain the definition for Metadata. When I try to compile it I get something like:

* MyRecord2.avsc: Can't redefine: com.example.Metadata

It seems that this issue is fixed in Avro, but I still get it: https://issues.apache.org/jira/browse/AVRO-3940

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions