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

JVM unable to decode requests for builtin.FailedEvent<Abc> #3835

Closed
matt2e opened this issue Dec 20, 2024 · 0 comments · Fixed by #3836
Closed

JVM unable to decode requests for builtin.FailedEvent<Abc> #3835

matt2e opened this issue Dec 20, 2024 · 0 comments · Fixed by #3836
Labels
triage Issue needs triaging

Comments

@matt2e
Copy link
Collaborator

matt2e commented Dec 20, 2024

Specific case that is broken for me: Try consuming from a dead letter topic in java
Steps:

  • ftl dev backend/runner/pubsub/testdata/java --log-level=DEBUG
  • In console go to subscriber.consumeFromDeadLetter and make a call with a body like this:
{
  "error": "example",
  "event": {
    "haystack": "",
    "time": "2020-12-09T16:09:53+00:00"
  }
}

Error:

debug: error:subscriber:runner1: Call to deployments dpl-subscriber-44uj67s1n2y7e45 failed: Failed to invoke verb subscriber.consumeFromDeadLetter class java.util.LinkedHashMap cannot be cast to class ftl.publisher.PubSubEvent (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; ftl.publisher.PubSubEvent is in unnamed module of loader io.quarkus.bootstrap.runner.RunnerClassLoader @7a79be86)
debug: info:subscriber:runner1: 2024-12-20 12:16:27,908 ERROR [xyz.blo.ftl.run.VerbRegistry] (executor-thread-1) Failed to invoke verb subscriber.consumeFromDeadLetter: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class ftl.publisher.PubSubEvent (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; ftl.publisher.PubSubEvent is in unnamed module of loader io.quarkus.bootstrap.runner.RunnerClassLoader @7a79be86)
debug: info:subscriber:runner1: 	at xyz.block.ftl.java.test.subscriber.Subscriber.consumeFromDeadLetter(Subscriber.java:47)
debug: info:subscriber:runner1: 	at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
debug: info:subscriber:runner1: 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
debug: info:subscriber:runner1: 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
debug: info:subscriber:runner1: 	at xyz.block.ftl.runtime.VerbRegistry$AnnotatedEndpointHandler.handle(VerbRegistry.java:82)
debug: info:subscriber:runner1: 	at xyz.block.ftl.runtime.VerbRegistry.invoke(VerbRegistry.java:54)
debug: info:subscriber:runner1: 	at xyz.block.ftl.runtime.VerbHandler.call(VerbHandler.java:22)
debug: info:subscriber:runner1: 	at xyz.block.ftl.v1.VerbServiceGrpc$MethodHandlers.invoke(VerbServiceGrpc.java:319)
debug: info:subscriber:runner1: 	at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
debug: info:subscriber:runner1: 	at io.grpc.PartialForwardingServerCallListener.onHalfClose(PartialForwardingServerCallListener.java:35)
debug: info:subscriber:runner1: 	at io.grpc.ForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:23)
debug: info:subscriber:runner1: 	at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:40)
debug: info:subscriber:runner1: 	at io.quarkus.grpc.ExceptionHandler.onHalfClose(ExceptionHandler.java:36)
debug: info:subscriber:runner1: 	at io.quarkus.grpc.runtime.supports.blocking.BlockingExecutionHandler.call(BlockingExecutionHandler.java:43)
debug: info:subscriber:runner1: 	at io.quarkus.grpc.runtime.supports.blocking.BlockingExecutionHandler.call(BlockingExecutionHandler.java:11)
debug: info:subscriber:runner1: 	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$4(ContextImpl.java:192)
debug: info:subscriber:runner1: 	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:270)
debug: info:subscriber:runner1: 	at io.vertx.core.impl.ContextImpl$1.execute(ContextImpl.java:221)
debug: info:subscriber:runner1: 	at io.vertx.core.impl.WorkerTask.run(WorkerTask.java:56)
debug: info:subscriber:runner1: 	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:637)
debug: info:subscriber:runner1: 	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
debug: info:subscriber:runner1: 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
debug: info:subscriber:runner1: 	at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
debug: info:subscriber:runner1: 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
debug: info:subscriber:runner1: 	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
debug: info:subscriber:runner1: 	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
debug: info:subscriber:runner1: 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
debug: info:subscriber:runner1: 	at java.base/java.lang.Thread.run(Thread.java:833)
debug: info:subscriber:runner1: 
debug: error:subscriber:runner1: Call to deployments dpl-subscriber-44uj67s1n2y7e45 failed: Failed to invoke verb subscriber.consumeFromDeadLetter class java.util.LinkedHashMap cannot be cast to class ftl.publisher.PubSubEvent (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; ftl.publisher.PubSubEvent is in unnamed module of loader io.quarkus.bootstrap.runner.RunnerClassLoader @7a79be86)

When fixed, we can disable the IfLanguage guard on TestRetry that was added in this PR: #3830

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

Successfully merging a pull request may close this issue.

1 participant