[ https://issues.apache.org/jira/browse/DELTASPIKE-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
df updated DELTASPIKE-1475: --------------------------- Description: I get a "Attempt to access the request/response without an active HTTP request" error in the following scenario: * Application scoped bean with DeltaSpike Scheduler injection * The bean calls: scheduler.registerNewJob(Worker.class) * Worker runs a JAX-RS request * An JAX-RS ClientRequestFilter and ClientResponseFilter filter is triggered (annotated with @ApplicationScoped and @Provider) * The filter has: @Inject @DeltaSpike Provider<HttpServletRequest> which throws an error once the cdi provider is resolved --> error Debugging notes: * org.apache.deltaspike.servlet.impl.produce.ServletObjectProducer#getHttpServletRequest is called, but RequestResponseHolder.REQUEST.get() throws an error * The WeldContextControl starts the Session and Request scopes but they only seem to store a state in the RequestContextHolder ThreadLocal Do I miss something? It seems the context controller does not really start a HttpServletRequest as the container would. Somehow the org.apache.deltaspike.servlet.impl.produce.RequestResponseHolder#bind must be called with an actual request. But how? was: I get a "Attempt to access the request/response without an active HTTP request" error in the following scenario: * Application scoped bean with DeltaSpike Scheduler injection * The bean calls: scheduler.registerNewJob(Worker.class) * Worker runs a JAX-RS request * An JAX-RS ClientRequestFilter and ClientResponseFilter filter is triggered (annotated with @ApplicationScoped and @Provider) * The filter has: @Inject @DeltaSpike Provider<HttpServletRequest> which throws an error once the cdi provider is resolved --> error Debugging notes: * org.apache.deltaspike.servlet.impl.produce.ServletObjectProducer#getHttpServletRequest is called, but RequestResponseHolder.REQUEST.get() throws an error * The WeldContextControl starts the Session and Request scopes but they only seem to store a state in the RequestContextHolder ThreadLocal Do I miss something? It seems the context controller does not really start a HttpServletRequest as the container would. > CDI Container Control does not create HttpServletRequest > -------------------------------------------------------- > > Key: DELTASPIKE-1475 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1475 > Project: DeltaSpike > Issue Type: Bug > Security Level: public(Regular issues) > Components: CdiControl > Affects Versions: 1.9.6 > Environment: EE8 > Tomcat 9.0.89 > Weld 3.1.9 > Resteasy 4.7.9 > Quartz 2.3.2 > Deltaspike-Scheduler 1.9.6 > Reporter: df > Priority: Major > Labels: cdi, jax-rs, request, weld > > I get a "Attempt to access the request/response without an active HTTP > request" error in the following scenario: > * Application scoped bean with DeltaSpike Scheduler injection > * The bean calls: scheduler.registerNewJob(Worker.class) > * Worker runs a JAX-RS request > * An JAX-RS ClientRequestFilter and ClientResponseFilter filter is triggered > (annotated with @ApplicationScoped and @Provider) > * The filter has: @Inject @DeltaSpike Provider<HttpServletRequest> which > throws an error once the cdi provider is resolved > --> error > > Debugging notes: > * > org.apache.deltaspike.servlet.impl.produce.ServletObjectProducer#getHttpServletRequest > is called, but RequestResponseHolder.REQUEST.get() throws an error > * The WeldContextControl starts the Session and Request scopes but they only > seem to store a state in the RequestContextHolder ThreadLocal > Do I miss something? It seems the context controller does not really start a > HttpServletRequest as the container would. > Somehow the > org.apache.deltaspike.servlet.impl.produce.RequestResponseHolder#bind must be > called with an actual request. But how? -- This message was sent by Atlassian Jira (v8.20.10#820010)