question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting noSuchMethodException on native build resteasy reactive server using reactive client

See original GitHub issue

Describe the bug

Hi,

I am new to quarkus, I have a pretty good java/spring background. I just started a Quarkus project and I have a really simple error. I am pretty sure the issue is me being novice but I cannot figure it out.

Generated a project using quarkus 2.4.0 final, using the following extensions;

quarkus-resteasy-reactive quarkus-rest-client-reactive-jackson quarkus-smallrye-health quarkus-quartz

When I use quartz scheduler, to go to my “rest-client” everything works fine (I log the response). Same thing using quarkus:dev. Basically I changed the GreetingResource to the following;

@Path("/test")
public class HttpController {

    @RestClient
    StreamService streamService;

    @GET
    @Path("/hello")
    @Produces(MediaType.APPLICATION_JSON)
    public Uni<Stream> testCall() {
        return streamService.getStreams();
    }
}

StreamService being just a stub which returns a json object that I receive as a pojo Stream object with Jackson

When I do a curl to /test/hello I do see my json come back properly with running with quarkus:dev

When I do the same curl on the natively compiled application with graalVm 21.3.0 I get ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (vert.x-eventloop-thread-0) Request failed: java.lang.RuntimeException: java.lang.NoSuchMethodException: org.company.HttpController.testCall()

Expected behavior

method in HttpController should be found when testing native image, and response should be returned (as does the jar does)

Actual behavior

getting NoSuchMethodException instead of getting a response back

How to Reproduce?

https://github.com/manofthepeace/quarkus-reproducer-21133

Steps to reproduce; 1- mvn quarkus:dev on the stub and exception project 2- send curl to /hello (get back json) 3- mvn clean package -Pnative on exception project 4- run the native app 5- send curl to /hello (get RuntimeException)

Output of uname -a or ver

Darwin MBP 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

Output of java -version

openjdk version “11.0.13” 2021-10-19 OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8) OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)

GraalVM version (if different from Java)

21.3.0

Quarkus version or git rev

2.4.0.FInal

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
DmitryErmolchikcommented, Jan 24, 2022

@elrob Hi, You need to use the right combination of Quarkus modules: <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-reactive-jackson</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-rest-client-reactive-jackson</artifactId> </dependency>

0reactions
elrobcommented, Jan 24, 2022

I hit the same issue. Same solution. quarkus-resteasy-reactive works fine in JVM mode but native mode required switching to quarkus-resteasy-reactive-jackson

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the REST Client Reactive - Quarkus
This guide explains how to use the REST Client Reactive in order to interact with REST APIs. REST Client Reactive is the REST...
Read more >
quarkusio/quarkus 2.7.2.Final on GitHub - NewReleases.io
#23853 - Fix out of date information about JVM debugging with Jib ... NoSuchMethodError: org.jboss.resteasy.reactive.server.core.parameters.converters.
Read more >
RestEasyReactive http response returns caught exception
I have a simple quarkus reactive resteasy server
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
... client; #​25357 - Native build will java 17 project fail because using a java 11 ... #​24447 - Improve usability of RESTEasy...
Read more >
java.lang.illegalstateexception: no primary or single public ...
Creating a dynamic web application that analyzes photos using the AWS SDK for Java ... org.springframework.boot.actuate.metrics.web.reactive.server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found