Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-309

MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • MP Fault Tolerance
    • None
    • Hide

      Steps to reproduce:

      • Build WF from PR - https://github.com/wildfly/wildfly/pull/13022
      • Run the test:
        git clone git@github.com:jboss-eap-qe/eap-microprofile-test-suite.git
        cd eap-microprofile-test-suite
        mvn clean verify -Djboss.dist=/home/mnovak/tmp/wildfly-19.0.0.Beta3-SNAPSHOT -DfailIfNoTests=false  -Dtest=FaultTolerance20AsyncPartialTest#bulkhead5q5Timeout
        
      Show
      Steps to reproduce: Build WF from PR - https://github.com/wildfly/wildfly/pull/13022 Run the test: git clone git@github.com:jboss-eap-qe/eap-microprofile-test-suite.git cd eap-microprofile-test-suite mvn clean verify -Djboss.dist=/home/mnovak/tmp/wildfly-19.0.0.Beta3-SNAPSHOT -DfailIfNoTests= false -Dtest=FaultTolerance20AsyncPartialTest#bulkhead5q5Timeout

    Description

      There is unexpected error log in following test scenario:

      • Deploy MP FT service with:
            @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";
                    }
                });
            }
        
      • 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:

      10:49:45,752 ERROR [stderr] (pool-22-thread-5) Exception in thread "pool-22-thread-5" Exception in thread "pool-22-thread-1" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
      10:49:45,752 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
      10:49:45,753 ERROR [stderr] (pool-22-thread-5) 	at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      10:49:45,754 ERROR [stderr] (pool-22-thread-5) 	at java.lang.Thread.run(Thread.java:748)
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
      10:49:45,755 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
      10:49:45,756 ERROR [stderr] (pool-22-thread-1) 	at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
      10:49:45,757 ERROR [stderr] (pool-22-thread-1) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      10:49:45,757 ERROR [stderr] (pool-22-thread-1) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      10:49:45,757 ERROR [stderr] (pool-22-thread-1) 	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            rhn-engineering-rhusar Radoslav Husar
            mnovak1@redhat.com Miroslav Novak
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: