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

resteasy-reactive client complains about server components missing #19557

Closed
maxandersen opened this issue Aug 21, 2021 · 2 comments · Fixed by #19567
Closed

resteasy-reactive client complains about server components missing #19557

maxandersen opened this issue Aug 21, 2021 · 2 comments · Fixed by #19567
Labels
area/jbang Issues related to when using jbang.dev with Quarkus area/rest kind/bug Something isn't working
Milestone

Comments

@maxandersen
Copy link
Member

Describe the bug

I have a command mode app which when run tells me:

2021-08-21 02:29:55,190 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.RuntimeException: Resteasy Reactive server side components are not installed.
	at org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl$1.create(RuntimeDelegateImpl.java:38)
	at org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl.createResponseBuilder(RuntimeDelegateImpl.java:68)
	at javax.ws.rs.core.Response$ResponseBuilder.newInstance(Response.java:839)
	at javax.ws.rs.core.Response.status(Response.java:567)
	at javax.ws.rs.core.Response.status(Response.java:578)
	at javax.ws.rs.WebApplicationException.<init>(WebApplicationException.java:229)
	at io.quarkus.resteasy.reactive.jackson.runtime.serialisers.JacksonBasicMessageBodyReader.readFrom(JacksonBasicMessageBodyReader.java:36)
	at org.jboss.resteasy.reactive.client.impl.ClientReaderInterceptorContextImpl.proceed(ClientReaderInterceptorContextImpl.java:54)
	at org.jboss.resteasy.reactive.client.impl.ClientSerialisers.invokeClientReader(ClientSerialisers.java:132)
	at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.readEntity(RestClientRequestContext.java:120)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseCompleteRestHandler.mapToResponse(ClientResponseCompleteRestHandler.java:26)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseCompleteRestHandler.handle(ClientResponseCompleteRestHandler.java:15)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseCompleteRestHandler.handle(ClientResponseCompleteRestHandler.java:11)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:133)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:831)

why are resteasy reactive server side parts required to do resteasy reactive client operations ?

reproducer:

///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS mavencentral,jitpack
//DEPS io.quarkus:quarkus-bom:${quarkus.version:2.2.0.CR1}@pom
//DEPS io.quarkus:quarkus-qute
//DEPS https://github.com/w3stling/rssreader/tree/v2.5.0
//DEPS io.quarkus:quarkus-rest-client-reactive
//DEPS io.quarkus:quarkus-rest-client-reactive-jackson

//JAVA 16+
import com.fasterxml.jackson.databind.JsonNode;
import io.quarkus.runtime.QuarkusApplication;
import io.quarkus.runtime.annotations.QuarkusMain;

import com.apptastic.rssreader.Item;
import com.apptastic.rssreader.RssReader;
import io.quarkus.qute.Engine;
import io.quarkus.qute.EvalContext;
import io.quarkus.qute.ReflectionValueResolver;
import io.quarkus.qute.ValueResolver;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipse.microprofile.rest.client.inject.RestClient;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.json.Json;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
import javax.ws.rs.client.ClientBuilder;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@QuarkusMain
public class update implements QuarkusApplication {

    @Inject
    Engine qute;

    @RestClient
    PlaylistService playlistService;

    public int run(String... args) throws Exception {

        String bio = """
               blah
                """;


        RssReader reader = new RssReader();
        Stream<Item> rssFeed = reader.read("https://xam.dk/blog/feed.atom");
        List<Item> posts = rssFeed.limit(3).collect(Collectors.toList());
        //var x = posts.get(0).lin

        var result = playlistService.playlist("snippet",1, "PL0EuBuKK-s1EL-K3okpYwR0QZbAPRVmEG",System.getenv("YOUTUBE_KEY"));

        System.out.println(result);

        return 0;
    }


    @RegisterRestClient(baseUri = "https://www.googleapis.com")
    public static interface PlaylistService {

        @GET
        @javax.ws.rs.Path("/youtube/v3/playlistItems")
        List<String> playlist(@QueryParam("part") String part,
                          @QueryParam("maxResults") int maxResults,
                          @QueryParam("playlistId") String playListId,
                          @QueryParam("key") String key);
    }

    }

Expected behavior

No response

Actual behavior

No response

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

No response

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

No response

Additional information

No response

@maxandersen maxandersen added the kind/bug Something isn't working label Aug 21, 2021
@quarkus-bot quarkus-bot bot added area/jbang Issues related to when using jbang.dev with Quarkus area/rest labels Aug 21, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 21, 2021

/cc @FroMage, @geoand, @quarkusio/devtools, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Aug 21, 2021

cc @michalszynkiewicz

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Aug 22, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Aug 23, 2021
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.0.Final Aug 23, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/jbang Issues related to when using jbang.dev with Quarkus area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants