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

2.0.0.Alpha2: Failed to generate client for Mp rest client interface #337

Closed
snowdrop-bot opened this issue May 8, 2021 · 0 comments
Closed
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

Similar to quarkusio#17084, I upgrade to Quarkus 2.0.0.alpha2 and got the following exception.

  • Quarkus 2.0.0.Alpha2
  • RestClient Reactive/Resteasy Reactive
2021-05-08 13:16:06,251 ERROR [org.jbo.res.rea.ser.cor.ExceptionMapping] (vert.x-eventloop-thread-3) Request failed : java.lang.RuntimeException: Error injecting com.example.demo.PostR
esourceClient com.example.demo.PostController.client
        at com.example.demo.PostController_Bean.create(PostController_Bean.zig:225)
        at com.example.demo.PostController_Bean.create(PostController_Bean.zig:248)
        at io.quarkus.arc.impl.RequestContext.getIfActive(RequestContext.java:68)
        at io.quarkus.arc.impl.ClientProxies.getDelegate(ClientProxies.java:33)
        at com.example.demo.PostController_ClientProxy.arc$delegate(PostController_ClientProxy.zig:42)
        at com.example.demo.PostController_ClientProxy.getAllPosts(PostController_ClientProxy.zig:133)
        at com.example.demo.PostController$quarkusrestinvoker$getAllPosts_e86e499f776b53a0f1950570a1bd4434ea61b09b.invoke(PostController$quarkusrestinvoker$getAllPosts_e86e499f776b53a0
f1950570a1bd4434ea61b09b.zig:55)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:132)
        at org.jboss.resteasy.reactive.server.handlers.RestInitialHandler.beginProcessing(RestInitialHandler.java:47)
        at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:17)
        at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:7)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1129)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:151)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
        at io.quarkus.vertx.http.runtime.StaticResourcesRecorder.lambda$start$1(StaticResourcesRecorder.java:65)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1129)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:114)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
        at io.vertx.ext.web.handler.impl.StaticHandlerImpl.lambda$sendStatic$1(StaticHandlerImpl.java:200)
        at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:124)
        at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
        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)
Caused by: org.eclipse.microprofile.rest.client.RestClientDefinitionException: org.jboss.resteasy.reactive.client.api.InvalidRestClientDefinitionException: Failed to generate client fo
r class interface com.example.demo.PostResourceClient : Cannot invoke "org.jboss.jandex.ClassInfo.interfaceNames()" because the return value of "org.jboss.jandex.IndexView.getClassByNa
me(org.jboss.jandex.DotName)" is null
        at io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl.build(RestClientBuilderImpl.java:275)
        at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.build(RestClientCDIDelegateBuilder.java:71)
        at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.createDelegate(RestClientCDIDelegateBuilder.java:53)
        at io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase.<init>(RestClientReactiveCDIWrapperBase.java:16)
        at com.example.demo.PostResourceClient$$CDIWrapper.<init>(PostResourceClient$$CDIWrapper.zig:21)
        at com.example.demo.PostResourceClient$$CDIWrapper_Subclass.<init>(PostResourceClient$$CDIWrapper_Subclass.zig:40)
        at com.example.demo.PostResourceClient$$CDIWrapper_Bean.create(PostResourceClient$$CDIWrapper_Bean.zig:194)
        at com.example.demo.PostResourceClient$$CDIWrapper_Bean.create(PostResourceClient$$CDIWrapper_Bean.zig:210)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at com.example.demo.PostResourceClient$$CDIWrapper_Bean.get(PostResourceClient$$CDIWrapper_Bean.zig:242)
        at com.example.demo.PostResourceClient$$CDIWrapper_Bean.get(PostResourceClient$$CDIWrapper_Bean.zig:258)
        at com.example.demo.PostController_Bean.create(PostController_Bean.zig:208)
        ... 29 more
Caused by: org.jboss.resteasy.reactive.client.api.InvalidRestClientDefinitionException: Failed to generate client for class interface com.example.demo.PostResourceClient : Cannot invoke "org.jboss.jandex.ClassInfo.interfaceNames()" because the return value of "org.jboss.jandex.IndexView.getClassByName(org.jboss.jandex.DotName)" is null
        at org.jboss.resteasy.reactive.client.impl.ClientProxies.get(ClientProxies.java:23)
        at org.jboss.resteasy.reactive.client.impl.WebTargetImpl.proxy(WebTargetImpl.java:373)
        at io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl.build(RestClientBuilderImpl.java:273)

The source codes: https://github.com/hantsy/quarkus-sandbox/tree/master/restclient-reactive
The target remote API is https://github.com/hantsy/quarkus-sandbox/tree/master/post-service


quarkusio#17089


$upstream:17089$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

2 participants