[JBoss JIRA] (DROOLS-3448) kie-server-integ-tests-policy: Maven plugin loads spurious resources, classes from the classpath
by Massimiliano Dessi (Jira)
[ https://issues.redhat.com/browse/DROOLS-3448?page=com.atlassian.jira.plug... ]
Massimiliano Dessi closed DROOLS-3448.
--------------------------------------
Resolution: Won't Fix
> kie-server-integ-tests-policy: Maven plugin loads spurious resources, classes from the classpath
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-3448
> URL: https://issues.redhat.com/browse/DROOLS-3448
> Project: Drools
> Issue Type: Bug
> Reporter: Edoardo Vacchi
> Assignee: Massimiliano Dessi
> Priority: Major
> Labels: drools-core
>
> Found out about this bug today, while trying to fix a full downstream build. A test in {{kie-server-integ-tests-policy}}, {{KieServerPolicyDroolsIntegrationTest}}, broke with a {{ClassCastException}}. The cast however should have been legal.
> h3.*tl;dr:*
> there is a class loading problem with {{kie-server-integ-tests-policy}} because of the way the Maven plugin is used there.
> h3. Suggested solution
> {{KieServerPolicyDroolsIntegrationTest}} instantiates a {{MavenCli}} object, but (apparently) the classpath is inherited by the test runner, causing classloading issues (detailed later). We should probably fork a new JVM with a fresh classpath, limited to the dependencies of the Maven plugin so that spurious classes are not on the classpath of the test.
> h3. Other details
> As part of DROOLS-3355, DROOLS-3307 I have moved CMMN package-building phase to the Assembler API. This highlighted an issue in the way the Maven plugin is tested (and/or the Service discovery mechanism, depending on how you want to see it)
> This is what I have understood:
> - CMMNAssemblerService is in its own package, which depends on jBPM.
> - the Maven plugin injects its own ClassLoader,
> - then it calls {{KieServices.Factory.get()}},
> - this causes the Service discovery to start, and all the services found in the {{kie.conf}}s that are on the current classpath
> Please notice that the classpath in the Full Downstream Build includes all the packages, so every kie.conf found in every project jar
> In the test that broke {{KieServerPolicyDroolsIntegrationTest}}:
> - Maven instance is created; It is created a new class loader (@ BuildMojo#buildDrl() ) with the jars on which Maven plugin depends.
> Before my fix, this *DID not* include the dependency on CMMN
> - *however* kie.conf for CMMNAssemblerService is in the class path of full downstream build!
> - because it is not a direct Maven dependency, it is *not* in the class loader of the Maven build
> - CMMNAssemblerService is therefore loaded from the *root classloader*
> - when KieAssemblerServices are processed, all assembler services *except CMMN* are found in the maven classpath, so they are loaded from that class loader
> - ClassCastException is raised when CMMNAssemblerService is used because it is not an instance of KieAssemblerService (really, it is: but the class KieAssemblerService has now been loaded from the maven class loader, while CMMNAssemblerService has been loaded from the root classloader)
> The problem is that the chain of classloaders AND the service discovery mechanism:
> - The classloader delegates to the root classloader, which loads from the full downstream classpath, which includes everything and loads a service that should not be found; this in turn causes the ClassCastException
> - the service discovery mechanism loads {{kie.conf}} from the full downstream classpath, which includes jars that should not be processed (as they would not be in the maven plugin classpath)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (DROOLS-5094) KIE-Base and KIE-Session break Test Scenario (Legacy) rhdm 7 (v 7.5.1 on EAP 7.2) Windows 10
by Toni Rikkola (Jira)
[ https://issues.redhat.com/browse/DROOLS-5094?page=com.atlassian.jira.plug... ]
Toni Rikkola commented on DROOLS-5094:
--------------------------------------
If you open the Test Scenario editor and select the Settings-tab you can find two dropdowns that let you select the kbase and ksession that the Test Scenario uses.
> KIE-Base and KIE-Session break Test Scenario (Legacy) rhdm 7 (v 7.5.1 on EAP 7.2) Windows 10
> --------------------------------------------------------------------------------------------
>
> Key: DROOLS-5094
> URL: https://issues.redhat.com/browse/DROOLS-5094
> Project: Drools
> Issue Type: Bug
> Components: Test Scenarios Editor
> Affects Versions: 7.26.0.Final
> Reporter: Charles Herrick
> Assignee: Toni Rikkola
> Priority: Critical
>
> bug[1]: Once you set the KIE-Base and a KIE-Session in Settings on a Project, subsequent Test Scenario (Legacy) inherit/adopt the KIE-Base and KIE-Session. The run-scenario fails without even running.
> Workaround:
> 1. Create and build the Test Scenario (Legacy)
> 2. Download the Test Scenario (creates an XML file)
> 3. Edit the XML file to set the Session to :
> <ksessions>
> <string>defaultKieSession</string>
> </ksessions>
> 4. Delete the Test Scenario from Decision-Manager > Space > Project > Assets.
> 5. Import Asset > the edited XML file.
> Now the Test Scenario will run.
> Bug[2]: In the Settings for a specific Test Scenario (Legacy) the KIE-Base and KIE-Session are NOT editable and can not be changed. To fix this you have to follow the workaround.
> Versions: Windows 10, rhdm 7 v 7.5.1, EAP v 7.2, Drools: rhdmAdmin (About) == 7.26 Final
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (WFLY-13162) ConcurrentModificationException in WildFlyJobXmlResolver
by Hielke Hoeve (Jira)
[ https://issues.redhat.com/browse/WFLY-13162?page=com.atlassian.jira.plugi... ]
Hielke Hoeve updated WFLY-13162:
--------------------------------
Affects Version/s: 20.0.0.Beta1
> ConcurrentModificationException in WildFlyJobXmlResolver
> --------------------------------------------------------
>
> Key: WFLY-13162
> URL: https://issues.redhat.com/browse/WFLY-13162
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 18.0.1.Final, 19.0.0.Beta3, 20.0.0.Beta1
> Reporter: Hielke Hoeve
> Assignee: Cheng Fang
> Priority: Major
>
> Because of a thread unsafe construction in WildFlyJobXmlResolver I am experiencing ConcurrentModificationExceptions while starting my EAR every so often. This is because every EJB of the EAR is processed by WildFlyJobXmlResolver in paralel threads. Even if it has no jbatch dependency or dependency to a EJB which does.
> This is not reproducable for every startup as it depends on the performance of the host machine, number of ejbs in ear, number of threads and thread timing.
> I have created an example project representing our project setup with which I am able to reproduce the issue using a default wildfly build. This test project contains 1 EJB with jbatch, a number of plain EJBs, a WAR which uses the jbatch EJB and an EAR.
> See below for the exception stacktrace.
> I have made a small fix for this issue @ https://github.com/hielkehoeve/wildfly/commit/82047233621c3e5bdbd45333ca4.... The example test project can also be found there.
> {code:java}
> 08:32:30,164 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."project.ear"."project-d.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."project.ear"."project-d.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "project-d.jar" of deployment "project.ear"
> at org.jboss.as.server@10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.util.ConcurrentModificationException
> at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
> at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:741)
> at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:351)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.merge(WildFlyJobXmlResolver.java:261)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:127)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.BatchEnvironmentProcessor.deploy(BatchEnvironmentProcessor.java:78)
> at org.jboss.as.server@10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
> ... 8 more
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 9 months
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Matěj Novotný (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Matěj Novotný commented on WFWIP-309:
-------------------------------------
[~lthon] you shouldn't need anything, it's a shared [always active|https://github.com/weld/core/blob/master/impl/src/main/java/org/jb...] context which should be visible from all threads.
Is it possible that you are getting this error because something else blew up previously and Weld was shutdown? That's probably the only case where I can think of getting this exception...
> 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)
4 years, 9 months
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Ladislav Thon (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Ladislav Thon commented on WFWIP-309:
-------------------------------------
Hey [~manovotn], what does it take to make the application context active/propagated to another thread? (I was thinking perhaps we need to propagate the thread context classloader, but I figured I'd rather ask.)
> 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)
4 years, 9 months
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Miroslav Novak (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Miroslav Novak commented on WFWIP-309:
--------------------------------------
cc-ing [~lthon]
> 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)
4 years, 9 months
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Miroslav Novak (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Miroslav Novak updated WFWIP-309:
---------------------------------
Security: (was: Security Issue)
> 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)
4 years, 9 months