Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Build fails with io.confluent:kafka-streams-avro-serde to v7.8.0 #45742

Open
teimyBr opened this issue Jan 21, 2025 · 8 comments
Open

Comments

@teimyBr
Copy link

teimyBr commented Jan 21, 2025

Describe the bug

Native Build fails with io.confluent:kafka-streams-avro-serde to v7.8.0

With newer Version then 7.5.1 Quarkus Native Build fails.

Error: An object of type 'org.apache.avro.reflect.ReflectData$AllowNull' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.

Expected behavior

Native Build works with every io.confluent:kafka-streams-avro-serde version

Actual behavior

Qurkus Native Build show this Error
Error: An object of type 'org.apache.avro.reflect.ReflectData$AllowNull' was found in the image heap. This type, however, is marked for initialization at image run time for the following reason: classes are initialized at run time by default.

How to Reproduce?

  1. Start buildNative with io.confluent:kafka-streams-avro-serde greater then 7.5.1
  2. Build fails

Output of uname -a or ver

No response

Output of java -version

Java version: 21.0.2+13

Mandrel or GraalVM version (if different from Java)

GraalVM CE 21.0.2+13.1

Quarkus version or git rev

3.17.7

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 8.12

Additional information

No response

Copy link

quarkus-bot bot commented Jan 21, 2025

/cc @Karm (native-image), @alesj (kafka,kafka-streams), @cescoffier (kafka), @galderz (native-image), @gunnarmorling (kafka-streams), @ozangunalp (kafka,kafka-streams), @rquinio (kafka-streams), @zakkak (native-image)

@cescoffier
Copy link
Member

@teimyBr
Copy link
Author

teimyBr commented Jan 21, 2025

In JVM mode, any version of io.confluent:kafka-avro-serializer can be used. In native mode, Quarkus supports the following versions: 6.2.x, 7.0.x, 7.1.x, 7.2.x, 7.3.x.

For version 7.4.x and 7.5.x, due to an issue with the Confluent Schema Serializer, you need to add another dependency

7.5.x is quite old.

I guess Quarkus should not depend on such old versions. I guess everyone want to use quite new versions

@cescoffier
Copy link
Member

We should rewrite with something like: for any version > 7.4...

@teimyBr
Copy link
Author

teimyBr commented Jan 22, 2025

io.confluent:kafka-streams-avro-serde to v7.5.1 works quite well on your side, but i would be cool if we can also use 7.6.x, 7.7.x, or even 7.8.x

7.4.x and 7.5.x is quite old

@ozangunalp
Copy link
Contributor

Quarkus doesn't depend on confluent serde artifacts, in any way, they are published to Confluent maven repository not to the Maven central. So yes we should write something like "> 7.4".

@teimyBr
Copy link
Author

teimyBr commented Jan 23, 2025

If i want to use implementation 'io.confluent:kafka-streams-avro-serde:7.8.0' how i can get the Native Build running without failing ?

@cescoffier
Copy link
Member

You may need extra native compilation metadata. I would recommend asking directly to Confluent. They can add the metadata in the jar directly.

Do you have a stack trace or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants