class io.quarkus.restclient.runtime.RestClientRecorder$1 cannot be cast to class org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl
See original GitHub issueDescribe the bug
I am upgrading my quarkus-bom version from the 2.12.2.Final to the most recent one. I am getting the following error when making a call to my REST endpoints or running my integration tests:
2022-11-23 10:39:36,457 ERROR [com.ctw.lm.dom.exc.map.RuntimeResponseMapper] (executor-thread-0) class io.quarkus.restclient.runtime.RestClientRecorder$1 cannot be cast to class org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl (io.quarkus.restclient.runtime.RestClientRecorder$1 and org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @2abf4075): java.lang.ClassCastException: class io.quarkus.restclient.runtime.RestClientRecorder$1 cannot be cast to class org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl (io.quarkus.restclient.runtime.RestClientRecorder$1 and org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @2abf4075) at org.jboss.resteasy.reactive.RestResponse$ResponseBuilder.newInstance(RestResponse.java:850) at org.jboss.resteasy.reactive.RestResponse$ResponseBuilder.create(RestResponse.java:1243) at org.jboss.resteasy.reactive.RestResponse$ResponseBuilder.create(RestResponse.java:1265) at org.jboss.resteasy.reactive.RestResponse$ResponseBuilder.ok(RestResponse.java:1311) at com.ctw.lm.api.impl.AnalyticsApiImpl.getIndividualBudgetPaginatedBetweenTwoDates(AnalyticsApiImpl.java:143) at com.ctw.lm.api.impl.AnalyticsApiImpl_Subclass.getIndividualBudgetPaginatedBetweenTwoDates$$superforward1(Unknown Source) at com.ctw.lm.api.impl.AnalyticsApiImpl_Subclass$$function$$1.apply(Unknown Source) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54) at io.quarkus.hibernate.validator.runtime.interceptor.AbstractMethodValidationInterceptor.validateMethodInvocation(AbstractMethodValidationInterceptor.java:71) at io.quarkus.hibernate.validator.runtime.jaxrs.ResteasyReactiveEndPointValidationInterceptor.validateMethodInvocation(ResteasyReactiveEndPointValidationInterceptor.java:21) at io.quarkus.hibernate.validator.runtime.jaxrs.ResteasyReactiveEndPointValidationInterceptor_Bean.intercept(Unknown Source) at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:50) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49) at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(Unknown Source) at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42) at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41) at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:33) at com.ctw.lm.api.impl.AnalyticsApiImpl_Subclass.getIndividualBudgetPaginatedBetweenTwoDates(Unknown Source) at com.ctw.lm.api.impl.AnalyticsApiImpl_ClientProxy.getIndividualBudgetPaginatedBetweenTwoDates(Unknown Source) at com.ctw.lm.api.AnalyticsApi$quarkusrestinvoker$getIndividualBudgetPaginatedBetweenTwoDates_ef7166c911640efd60ac16d68b3eb8a24a5c85d8.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:115) at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:142) at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:564) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29) at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
I don´t know if this helps but I started incrementing the version one by one and I noticed this started happening on the 2.13.1.Final version.
Expected behavior
I should be able to call my REST endpoints and receive a response. I should be able to run my integration tests successfully.
Actual behavior
It is throwing the error: RestClientRecorder$1 cannot be cast to class org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl
when making calls to the REST Client and when running integration tests.
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
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (1 by maintainers)
The fact that it worked before was an accident
But why is the REST Client dependency (which is responsible to communicate with external services) is related to the REST client of the actual project?