Quarkus 3.21.4 -> 3.24.4. Проблемы: «Контекст запроса не был активным при попытке получить экземпляр боба для клиентскогJAVA

Программисты JAVA общаются здесь
Anonymous
Quarkus 3.21.4 -> 3.24.4. Проблемы: «Контекст запроса не был активным при попытке получить экземпляр боба для клиентског

Сообщение Anonymous »

После обновления Quarkus в нашем проекте с 3,21,4 до 3.24.4 Наш тестовый набор теперь не снят сбоку нескольких тестов (кажется, не всегда является одинаковой суммой, поэтому, как представляется, есть некоторая ловкость), за этим исключением: < /p>

Код: Выделить всё

2025-09-01 10:20:30.558 ERROR traceId=ab33746340bdd8c93728c3403f544134, parentId=, spanId=ba3d07db6204374c, sampled=true, requesterId=dead1234cafe123f2812f93f  co.ma.us.ap.RestExceptionMapper:174 [vert.x-eventloop-thread-4-552] An exception occurred: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=io.quarkus.vertx.http.runtime.CurrentVertxRequest, id=0_6n6EmChCiiDdd8HelptG_A0AE]
- you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding: jakarta.enterprise.context.ContextNotActiveException: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=io.quarkus.vertx.http.runtime.CurrentVertxRequest, id=0_6n6EmChCiiDdd8HelptG_A0AE]
- you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding
at io.quarkus.arc.impl.ClientProxies.notActive(ClientProxies.java:76)
at io.quarkus.arc.impl.ClientProxies.getSingleContextDelegate(ClientProxies.java:32)
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ClientProxy.arc$delegate(Unknown Source)
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ClientProxy.setCurrent(Unknown Source)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusCurrentRequest.set(QuarkusCurrentRequest.java:33)
at org.jboss.resteasy.reactive.server.core.CurrentRequestManager.set(CurrentRequestManager.java:12)
at org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext.handleRequestScopeActivation(ResteasyReactiveRequestContext.java:704)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.handleRequestScopeActivation(QuarkusResteasyReactiveRequestContext.java:39)
I have tried using Cursor, CoPilot, even Junie (because we use IntelliJ in our project) to figure out a solution and they have been unable to figure it out, some of the things they tried:

Adding @ActivateRequestContext to multiple classes (all of them tagged as @Provider and implementing ContainerQuestFilter) < /li>
Добавление @singleton < /code> к тем же классам, которые они добавили предыдущую аннотацию < /li>
< /ul>
Прямо сейчас мы делаем меньшие удары, мы перешли с 3,21,4 к 3.22.1, и все было в порядке. Я проверил руководство по миграции 3.23, и я не вижу ничего, что, по крайней мере, из -за моего понимания это вызвало бы это.

Код: Выделить всё

public class RestExceptionMapper {

private static final Logger LOG = Logger.getLogger(RestExceptionMapper.class);
private static final String LOG_PREFIX = "An exception occurred: %s";

private static final Set

Подробнее здесь: [url]https://stackoverflow.com/questions/79752360/quarkus-3-21-4-3-24-4-issues-requestscoped-context-was-not-active-when-tryi[/url]

Вернуться в «JAVA»