SRMSG18010: Unable to create an instance of io.vertx.kafka.client.serialization.JsonObjectDeserializer
#34919
Replies: 12 comments 5 replies
-
/cc @alesj (kafka), @cescoffier (kafka), @ozangunalp (kafka) |
Beta Was this translation helpful? Give feedback.
-
The We had a depreciation notice since 2.12.0 and the |
Beta Was this translation helpful? Give feedback.
-
First of all, thank you for your quick answer. Should I just replace vertx-kafka-client with quarkus-kafka-client in my pom.xml? Is there anything else I should modify or is quarkus supposed to just use io.quarkus.kafka.client instead of vertx without any configuration changes (like adding something to the properties file)? |
Beta Was this translation helpful? Give feedback.
-
From the stack trace it seems like you are already using the |
Beta Was this translation helpful? Give feedback.
-
I am updating a quarkus project developed a long time ago and the reason why I originally installed io.vertx.kafka.client was a stack trace reporting that package could not be found. If I do not need to explicitly force quarkus-smallrye-reactive-messaging-kafka to use io.quarkus.kafka.client.serialization.JsonObjectDeserializer, then there must be somewhere a config explicitly setting io.vertx.kafka.client.serialization.JsonObjectDeserializer that I am overlooking. |
Beta Was this translation helpful? Give feedback.
-
If a reactive messaging channel consumes |
Beta Was this translation helpful? Give feedback.
-
@ozangunalp should this be closed? It doesn't seem like a bug, correct? |
Beta Was this translation helpful? Give feedback.
-
Or maybe converted to a discussion? |
Beta Was this translation helpful? Give feedback.
-
Sure let's convert this to discussion |
Beta Was this translation helpful? Give feedback.
-
/cc @alesj (kafka), @cescoffier (kafka), @ozangunalp (kafka) |
Beta Was this translation helpful? Give feedback.
-
What looks strange to me is that I do not have io.vertx.kafka.client configured in the classpath and I get an "Unable to create the publisher or subscriber during initialization", but @ozangunalp told me this should not happen, because the default of io.quarkus.smallrye-reactive-messaging is not to create an instance of io.vertx.kafka.client.serialization.JsonObjectDeserializer deserializer but one of io.quarkus.kafka.client.serialization.JsonObjectDeserializer. How can I debug why this works differently than I expected? I did not changed the application.properties, so this sounds pretty inexplicable to me. |
Beta Was this translation helpful? Give feedback.
-
I had a similiar error using Quarkus and I solved using this property in application.properties: |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Hi, I am trying to build a native image using maven and GraalVM, but I'm running into a java.lang.ClassNotFoundException for io.vertx.kafka.client.serialization.JsonObjectDeserializer. When I try to run the jar, I have no problem.
I tried to create a reflection-config.json file with io.vertx.kafka.client.serialization.JsonObjectDeserializer, the file was processed by native-image.cmd without any error message, but it still does not work.
I am using following version on Windows:
C:\source\backend\services\sensor\target>java --version
java 20.0.2 2023-07-18
Java(TM) SE Runtime Environment Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14, mixed mode, sharing)
I also tried with compiling graalvm-jdk-20_linux-x64_bin.tar.gz on a Linux docker, but same result.
Since Quarkus and Vertx are frequently used in combination, I believe there could be a way to make this working, but in doubt I raise a bug ticket.
Expected behavior
The quarkus native executable can be started
Actual behavior
How to Reproduce?
Relevant part of my pom.xml
<quarkus-plugin.version>3.2.0.Final</quarkus-plugin.version>
<vertx.version>4.4.4</vertx.version>
io.quarkus
quarkus-vertx
io.vertx
vertx-kafka-client
${vertx.version}
mvnw -Pnative clean package
Output of
uname -a
orver
No response
Output of
java -version
java 20.0.2 2023-07-18 Java(TM) SE Runtime Environment Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 20.0.2+9.1 (build 20.0.2+9-jvmci-23.0-b14, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvnw -Pnative clean package
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions