| Summary: | RuntimeManagerFactory may fail to initialize in OSGi | ||
|---|---|---|---|
| Product: | [Retired] JBoss BRMS Platform 6 | Reporter: | Marek Winkler <mwinkler> |
| Component: | Fuse Integration | Assignee: | Edson Tirelli <etirelli> |
| Status: | CLOSED EOL | QA Contact: | Marek Winkler <mwinkler> |
| Severity: | high | Docs Contact: | Petr Penicka <ppenicka> |
| Priority: | medium | ||
| Version: | 6.2.0 | CC: | kverlaen, lpetrovi, mwinkler |
| Target Milestone: | ER2 | ||
| Target Release: | 6.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 20:11:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Marek Winkler
2016-02-21 15:53:55 UTC
I would not mind if this behaviour occurred strictly when you install 'kie-api' and then later 'jbpm' features. What puzzles me is that the problem occurs also when you install just 'jbpm' feature. Marek, so this happens when you install jbpm feature without kie api? Not sure I fully understood the problem... We could provide reset method on RuntimeManagerFactory which would put it back to initial state. Would this be valid solution? I'd like to avoid any more advanced logic as that could lead to unexpected runtime consequences. P.S. is there anywhere that reproducer or wasn't it yet created? Maciej, sorry for not having this described in more detail. The test case (org.drools.karaf.itest.RuntimeManagerFeatureKarafIntegrationTest) can be found in [1], sorry for the delay with the reproducer. It was also caused by the fact that I was unable to reproduce the original behaviour - let me summarize the problem: 1. user installs drools-module feature - it includes kie-api, drools, but not jBPM, 2. user attempts to obtain a jBPM service from the KIE-API, e.g. RuntimeManagerFactory using "RuntimeManagerFactory.Factory.get()", which returns null (no jBPM installed, so this behaves as expected), 3. user installs jbpm feature, 4. user calls "RuntimeManagerFactory.Factory.get()" again, which should now succeed, but it does not; instead, it throws the following exception: java.lang.RuntimeException: RuntimeManagerFactory was not initialized, see previous errors Unfortunately, I was unable to reproduce the original problem I had when I installed jbpm feature only and encountered this exception - maybe I had made a mistake somewhere at that time (or there is a nasty race condition which I was unable to reproduce now). Hope this makes it clear, sorry for not being specific enough in the initial description. [1] https://github.com/droolsjbpm/droolsjbpm-integration/pull/357 I believe we are already using very similar approach in Drools, namely for ProcessBuilderFactory and ProcessRuntimeFactory. See https://github.com/droolsjbpm/drools/commit/b28fd0a2b and https://github.com/droolsjbpm/jbpm/commit/da31bb30a90a The factories are being forcefully re-initialized from jBPM Activators. Thanks Petr, I followed similar approach as in mentioned change on drools/jbpm droolsjbpm-knowledge master https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/6ddcadd9eb0b7fd85670eb08b7d9d7fbaa5504f5 6.4.x https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/4add4634d9f6725d27635764edf0911485f0755a jbpm master https://github.com/droolsjbpm/jbpm/commit/e42ed0d4a04f0225cce0aca55234fb4da3ac2f05 6.4.x https://github.com/droolsjbpm/jbpm/commit/fee656606d29e4a9025bc63cf9e11329d5128eac droolsjbpm-integration master https://github.com/droolsjbpm/droolsjbpm-integration/commit/738af66181b80be6addd6c32d18902437cc7cdda 6.4.x https://github.com/droolsjbpm/droolsjbpm-integration/commit/73c928d6b4d05d20aa20e989dd19b1d45b428810 Verified in BRMS 6.3.0 ER2. |