[jboss-jira] [JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped

Radoslav Husar (Jira) issues at jboss.org
Fri Feb 28 05:18:00 EST 2020


    [ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13984848#comment-13984848 ] 

Radoslav Husar commented on WFWIP-309:
--------------------------------------

Thanks guys. Just to note, I have a fix and will update the PR with a fix later today.

> MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WFWIP-309
>                 URL: https://issues.redhat.com/browse/WFWIP-309
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: MP Fault Tolerance
>            Reporter: Miroslav Novak
>            Assignee: Radoslav Husar
>            Priority: Blocker
>
> There is unexpected error log in following test scenario:
> - Deploy MP FT service with:
> {noformat}
>     @Asynchronous
>     @Bulkhead(value = 15, waitingTaskQueue = 15)
>     @Timeout(value = 1000)
>     @Fallback(fallbackMethod = "processFallback")
>     public CompletionStage<MyConnection> bulkheadTimeout(boolean fail) throws InterruptedException {
>         if (fail) {
>             Thread.sleep(2000);
>         }
>         return CompletableFuture.completedFuture(new MyConnection() {
>             @Override
>             public String getData() {
>                 return "Hello from @Bulkhead @Timeout method";
>             }
>         });
>     }
>     private CompletionStage<MyConnection> processFallback(boolean fail) {
>         return CompletableFuture.completedFuture(new MyConnection() {
>             @Override
>             public String getData() {
>                 return "Fallback Hello";
>             }
>         });
>     }
> {noformat}
> - Send 10+ parallel requests with fail == true
> Expected result:
> All requests should go to fallback.
> Actual Result:
> This test is currently hitting issue WFWIP-308 however additionally there is error in server log:
> {code}
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) Exception in thread "pool-22-thread-4" Exception in thread "pool-22-thread-2" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 16:55:41,374 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 16:55:41,375 ERROR [stderr] (pool-22-thread-2) 	at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list