[ 
https://issues.apache.org/jira/browse/AVRO-3626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601343#comment-17601343
 ] 

Christophe Le Saec commented on AVRO-3626:
------------------------------------------

There are on integration test [example 
here|https://github.com/apache/avro/tree/master/lang/java/integration-test], 
with [factories declare here in 
pom.xml|https://github.com/apache/avro/blob/master/lang/java/integration-test/codegen-test/pom.xml#L60-L69].
Hope it will help, i didn't see any pb with your java code.

> 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, 
> GenericDateLogicalType.java, GenericDateLogicalTypeFactory.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)

Reply via email to