snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Resteasy Reactive report NoSuchMethod Exception with quarkus-keycloak-admin-client dependencies in native mode #297

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug (Describe the problem clearly and concisely.)

I switch my project from Resteasy to Resteasy Reactive recently. When I call post or put endpiont in native mode., NoSuchMethodException will be report.

It work fine in JVM mode.

2021-03-12 22:46:11,897 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-1) Request failed: java.lang.RuntimeException: java.lang.NoSuchMethodException: org.acme.CategoryResource.add(org.acme.Category)
        at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getMethod(ResteasyReactiveResourceInfo.java:55)
        at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getParameterAnnotations(ResteasyReactiveResourceInfo.java:89)
        at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.getAnnotations(RequestDeserializeHandler.java:115)
        at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.isReadable(RequestDeserializeHandler.java:101)
        at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.handle(RequestDeserializeHandler.java:62)
        at org.jboss.resteasy.reactive.server.handlers.RequestDeserializeHandler.handle(RequestDeserializeHandler.java:25)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:117)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at java.lang.Thread.run(Thread.java:834)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
        at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
Caused by: java.lang.NoSuchMethodException: org.acme.CategoryResource.add(org.acme.Category)
        at java.lang.Class.getMethod(DynamicHub.java:1089)
        at org.jboss.resteasy.reactive.server.spi.ResteasyReactiveResourceInfo.getMethod(ResteasyReactiveResourceInfo.java:50)
        ... 14 more

My project dependent quarkus-keycloak-admin-client.

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-reactive-jsonb</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-reactive</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-keycloak-admin-client</artifactId>
        </dependency>

When I remove the dependency on quarkus-keycloak-admin-client, the project will work fine. So I think the problem has something to do with quarkus-keycloak-admin-client.

To Reproduce

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).

Or attach an archive containing the reproducer to the issue.

demo1.zip

Steps to reproduce the behavior:

  1. mvn package -Pnative
  2. run program
  3. call post endpoint

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.) Category

Environment (please complete the following information):

Additional context (Add any other context about the problem here.)


https://github.com/quarkusio/quarkus/issues/15681


$upstream:15681$