Closed nhenneaux closed 3 years ago
It was due to a JAX-RS/CDI bean with HttpServletRequest
injected using @Context
. I replaced it with a provider called when used to provide the request.
@Provider
public class HttpServletRequestProducer {
@Context
private ResourceContext resourceContext;
@Produces
HttpServletRequest request() {
return resourceContext.getResource(HttpServletRequest.class);
}
@nhenneaux Are you saying you were able to overcome a bug, or your app code has changed since 2.33? If there is a bug, I would very much love to see a reproducer.
I had to change the application to work with 2.34/3.0.2. However the class was a bit strange mixing CDI and JAXRS annotations.
Mixing 2 injection frameworks is always strange, but even more strange is that it stopped working in 2.34 for you. Can you share more details about the app?
It was due to a JAX-RS/CDI bean with HttpServletRequest injected using @Context. I replaced it with a provider called when used to provide the request.
@Alternative
@Priority(Interceptor.Priority.LIBRARY_BEFORE)
@Path("")
public class Service {
@Context
HttpServletRequest request;
With new version 2.34 & 3.0.2 I'm getting the error
Not inside a request scope
when starting the application.Version 3.0.1 & 2.33 are working fine.