Michael Nielson created AVRO-2947:
-------------------------------------
Summary: Classloading Race condition with LogicalTypes.register
Key: AVRO-2947
URL: https://issues.apache.org/jira/browse/AVRO-2947
Project: Apache Avro
Issue Type: Bug
Components: java, logical types
Affects Versions: 1.9.2, 1.10.0
Reporter: Michael Nielson
In the Java api you must register any custom logical types before you use them
with:
{{ LogicalTypes.register }}
This must be done before the schema is parsed or the parsing process will not
discover the logical type, additionally for generated classes the schema is
parsed when the class is loaded.
This creates a race condition where you must have your calls to register
logical types happen before anything attempts to load your class.
This could be a solution to the problem:
https://github.com/apache/avro/pull/885#issuecomment-640462476
--
This message was sent by Atlassian Jira
(v8.3.4#803005)