-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Describe the bug
When build native, method handle get request throw error NoSuchMethodException. This happening only with reactive version of quarkus-resteasy
not sure which one causing it. Tried same code with non-reactive package and working as expected.
Expected behavior
Not throw error but expected output.
Actual behavior
Throw error
java.lang.RuntimeException: java.lang.NoSuchMethodException: org.acme.SseResource.updates(jakarta.ws.rs.sse.SseEventSink)
at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getMethod(ResteasyReactiveResourceInfo.java:72)
at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getAnnotations(ResteasyReactiveResourceInfo.java:89)
at org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext.getMethodAnnotations(ResteasyReactiveRequestContext.java:553)
at org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext.getAllAnnotations(ResteasyReactiveRequestContext.java:531)
at org.jboss.resteasy.reactive.server.core.SseUtil.serialiseDataToString(SseUtil.java:137)
at org.jboss.resteasy.reactive.server.core.SseUtil.serialiseEvent(SseUtil.java:74)
at org.jboss.resteasy.reactive.server.core.SseUtil.send(SseUtil.java:39)
at org.jboss.resteasy.reactive.server.jaxrs.SseEventSinkImpl.send(SseEventSinkImpl.java:35)
at org.acme.SseResource.updates(SseResource.java:32)
at org.acme.SseResource_ClientProxy.updates(Unknown Source)
at org.acme.SseResource$quarkusrestinvoker$updates_f6d96532cf27a9c9af07245c73539cec77298605.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base@17.0.7/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
Caused by: java.lang.NoSuchMethodException: org.acme.SseResource.updates(jakarta.ws.rs.sse.SseEventSink)
at java.base@17.0.7/java.lang.Class.getMethod(DynamicHub.java:2227)
at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getMethod(ResteasyReactiveResourceInfo.java:67)
... 22 more
How to Reproduce?
git clone -b sse-native-method-404 git@github.com:jedla97/quarkus-reproducers.git
cd quarkus-reproducers
mvn clean package -Dquarkus.platform.version=3.5.1 -Dnative
- Start Quarkus
./target/quarkus-reproducers-1.0.0-SNAPSHOT-runner
- Go to http://127.0.0.1:8080/sse/client
After this error appear.
You can see error also in response.
Output of uname -a
or ver
Linux fedowa 6.5.9-300.fc39.x86_64
Output of java -version
openjdk version "17.0.7" 2023-04-18 OpenJDK Runtime Environment GraalVM CE 22.3.2 (build 17.0.7+7-jvmci-22.3-b18) OpenJDK 64-Bit Server VM GraalVM CE 22.3.2 (build 17.0.7+7-jvmci-22.3-b18, mixed mode, sharing)
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.5.x, 3.2.8.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.9.3
Additional information
Was found when creating some test coverage for #35966 not sure if there is any relation.
Non reactive repository where are no problem is here git clone -b sse-non-reactive git@github.com:jedla97/quarkus-reproducers.git