Created attachment 884105 [details] stacktrace Description of problem: deploying project via REST as follows POST http://${host}:${port}/business-central/rest/deployment/org.jboss:integration:1.2.0-SNAPSHOT/deploy fails with exception in server log javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @ApplicationScoped does not exist within current thread (see a more detailed stacktrace in attachment) Please note that the tested version is community kie-wb-6.1.0.SNAPSHOT.
the main issue is actually CDI implementation in WebSphere that does not work well with background threads, even though the CDI beans are application scoped. By default deployment requests in REST are processed asynchronously by utilizing internal thread pool to make the processing more efficient in case of larger deployments. Due to the CDI issues on WebSphere deployments in REST have been enhanced to be configurable in terms of what mode does it run with: - async - default - sync - must be explicitly enabled by disabling async with system property -Dkie.services.rest.deploy.async=false that is considered a limitation on WAS until CDI issues will be resolved or enhanced background processing will be introduced on our side like background operations performed by WorkManager (JEE spec). droolsjbpm-integration master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/7ae55443cd284fea1102fc7ef29baa928e692110 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/717230f47978713f6c9bd8eb8e52a1fb7a6ea666 kie-wb-distributions master: https://github.com/droolsjbpm/kie-wb-distributions/commit/55a67f0431ad1479a60b18fc75e81cd4f3c3d30d 6.0.x: https://github.com/droolsjbpm/kie-wb-distributions/commit/a81bdaeda577ce93e28fb8841690a837071b70a4
Verified with BPMS-6.0.2.ER2