zolyfarkas / avro

Mirror of Apache Avro
Apache License 2.0
16 stars 11 forks source link

Support for higher avro versions #12

Open deeptiantony opened 1 year ago

deeptiantony commented 1 year ago

Hi @zolyfarkas , Is there any plan to support higher avro versions?

We have integrated custom avro with confluent schema registry(Confluent-5.5.0), but during the upgrade found below issue and blocked on upgrade: From 6.2.0, a method overload was deleted between Avro version 1.9.1 and 1.10.1. Avro version that is earlier than 1.10.1 might result in below error: Caused by: java.lang.NoSuchMethodError: org.apache.avro.Schema.toString(Ljava/util/Collection;Z)Ljava/lang/String;

Any update or suggestion will be helpful. Thanks in advance.

zolyfarkas commented 1 year ago

@deeptiantony I have released 1.10.0.12p to github packages(https://maven.pkg.github.com/zolyfarkas/avro) which should take care of the error you reported.

please let me know if you see any other errors.

thanks!

deeptiantony commented 1 year ago

@zolyfarkas Thank you. I am not getting NoSuchMethodError: org.apache.avro.Schema.toString error but facing below issue:

SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.ExceptionInInitializerError] with root cause
java.lang.reflect.InaccessibleObjectException: Unable to make field private final byte[] java.lang.String.value accessible: module java.base does not "opens java.lang" to unnamed module @3b23cf66
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
        at org.apache.avro.util.Strings$3.run(Strings.java:120)
        at org.apache.avro.util.Strings$3.run(Strings.java:114)

Appreciate any help.

zolyfarkas commented 1 year ago

Hi, this is due to the newer JDK introduced restrictions that are interfering with some of the optimizations in there, you should be able to bypass them by adding: --add-opens=java.base/java.lang=ALL-UNNAMED to your JRE startup args.

I will eliminate this type of access in future versions of the library.

deeptiantony commented 8 months ago

Hi @zolyfarkas Is there any plan to support higher avro version 1.11.3?

zolyfarkas commented 8 months ago

I have been looking into it, I will try to make incremental progress on it. I will prioritize the security vulnerabilities and make a intermediate release to plug them.

Long term I will try to contribute as much as I can into the official distribution (like https://github.com/apache/avro/pull/1217).

Unfortunately my time is very limited due to shifting priorities, so any help is appreciated...

deeptiantony commented 8 months ago

Thanks for responding @zolyfarkas. Can you let me know tentatively when you can provide intermediate release?