You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Florian DANIEL (Jira)" <ji...@apache.org> on 2022/09/07 12:11:00 UTC

[jira] [Updated] (AVRO-3626) Unable to add a Custom LogicalType before compiling the Schema

     [ https://issues.apache.org/jira/browse/AVRO-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian DANIEL updated AVRO-3626:
---------------------------------
    Attachment: GenericDate.java

> Unable to add a Custom LogicalType before compiling the Schema
> --------------------------------------------------------------
>
>                 Key: AVRO-3626
>                 URL: https://issues.apache.org/jira/browse/AVRO-3626
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: build, java, logical types
>    Affects Versions: 1.11.1
>            Reporter: Florian DANIEL
>            Priority: Blocker
>         Attachments: GenericDate.java, GenericDateConversion.java
>
>
> I'm using Maven to build my project. I'm trying to add my custom LogicalType (e.g. GenericDate another implementation of DateConversion). When the Maven project is building with *customLogicalTypeFactories* and *customConversions* tags, I'm getting the following error :
> {noformat}
> Failed to execute goal org.apache.avro:avro-maven-plugin:1.11.1:schema (schemas) on project atlas_v: Error compiling protocol file [file.avsc] to atlas-v\src\main\java{noformat}
> {code:java}
> <customLogicalTypeFactories>
> <logicalTypeFactory>com.vadis.utils_avro.GenericDateLogicalTypeFactory</logicalTypeFactory>
> </customLogicalTypeFactories>
> <customConversions>
> <customConversion>com.vadis.utils_avro.GenericDateConversion</customConversion>
> </customConversions>{code}
> It would be my build which is looking for my custom LogicalType (whereas they are inside my project itself) to be automatically generated by Avro.
> Then, I specify to Avro to "register" my LogicalType :
> {code:java}
> LogicalTypes.register("generic_data", new GenericDateLogicalTypeFactory()); {code}
> Should I change the build process or do you have any solution to do that ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)