io.vertx.core.eventbus.EventBus cannot decode List<Long> payload (???)
See original GitHub issueDescribe the bug
I do something like
eventBus.send("myBusAddress", List.of(1L,2L));
and having a consumer method like
@ConsumeEvent(BUS_ADDRESS_RETRY)
public void doAsync(List<Long> longList) {
...
}
Expected behavior
Was hoping this would just work, meaning that in doAsync the longList = [1L,2L]
Actual behavior
Instead I get
2022-11-23 10:00:25,967 ERROR job=[] traceId=[] spanId=[] [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile local): java.lang.ClassNotFoundException: java.util.List<java.lang.Long>
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:459)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:450)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:459)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:450)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at io.quarkus.deployment.steps.VertxProcessor$build609260703.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.VertxProcessor$build609260703.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:110)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:69)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:122)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
at java.base/java.lang.Thread.run(Thread.java:833)
How to Reproduce?
No response
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.13.3.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
When trying to use latest quarkus version 2.14.1.Final breaks my project build with
cannot find symbol symbol: class OkHttpClient package okhttp3 does not exist
Think that’s another issue I have to create when I dont get this fixed on my own-
Issue Analytics
- State:
- Created 10 months ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Vert.x Core Manual
The Event bus. Shared data - local maps and clustered distributed maps. Periodic and delayed actions. Deploying and undeploying Verticles. Datagram ...
Read more >Java Examples for io.vertx.core.eventbus.Message - Javatips.net
This java examples will help you to understand the usage of io.vertx.core.eventbus.Message. These source code samples are taken from different open source ...
Read more >Vertx event bus and encoding issues when ... - Stack Overflow
What am i missing when encoding/decoding objects. I'm not entirely sure how a string relates to a ByteArray but I need to pass...
Read more >Uses of Interface io.vertx.core.eventbus.EventBus
Methods in io.vertx.core.eventbus.impl that return EventBus. Modifier and Type, Method and Description. <T> EventBus, EventBusImpl.
Read more >EventBus Messages Getting Lost on AWS Cluster
vertx.eventBus().send(eventBusSubject, payload, deliveryOptions, (res) -> { ... /main/java/io/vertx/core/eventbus/impl/clustered/ConnectionHolder.java#L93.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can confirm that the issue is fixed with 2.14.2.Final. 😃
Agree, given the error message says
java.lang.ClassNotFoundException: java.util.List<java.lang.Long>
, which just points toType.toString()
again.