Description of problem: Since Drools 5.3.0.CR1 concurrent creation of different knowledgebases from filesystem DRL rule definition leads to illegal bytecode. Reproduceable with Janino and eclipse compiler. I have a maven based test project which executes the unit tests in parallel, this is the result: runFirst(de.trion.drools53.TwoTest): -1 runFirst(de.trion.drools53.FourTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack runSecond(de.trion.drools53.FourTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack runFirst(de.trion.drools53.OneTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Expecting to find integer on stack runFirst(de.trion.drools53.ThreeTest): (class: de/trion/drools53/Rule_When_a_user_is_young__print_his_name_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Incompatible object argument for function call runSecond(de.trion.drools53.ThreeTest): (class: de/trion/drools53/Rule_When_there_is_god__the_light_always_shines_DefaultConsequenceInvoker, method: equals signature: (Ljava/lang/Object;)Z) Unable to pop operand off an empty stack Workaround: synchronize access Not affected: Drools 5.3.0.Beta Version-Release number of selected component (if applicable): JBoss SOA-P 5.3.0 How reproducible: https://issues.jboss.org/browse/JBRULES-3283 contains testing project and description
This BZ will be resolved when we include Drools newer than 5.4 (per JBRULES-3283).
Customer has asked for a patch on 5.3 for this item, here is their issue description: The other issue, JBRULES-3283, is actually more important. We're loading KnowledgeBuilders and KnowledgeBases on demand in various 'rule engine' components in the system (to minimize the memory footprint, '.drl' files which are not required/requested are not loaded). These engines can be accessed in parallel. Furthermore, we have one engine in which we load 71 ".drl" files in parallel into different KnowlegdeBuilders to speed up initialization. Due to JBRULES-3283 we manually need to synchronize every 'KnowledgeBuilder.add()' call using a common monitor, even though we're using different KnowlegdeBuilders. This 'workaround' is quite error-prone and when one forgets to apply it, can lead to non-deterministic problems in our rule engines.
JBRULES-3283 was fixed in the version of Drools (5.3.1.BRMS-P01) released with SOA-P 5.3.1.GA. Note, that JBRULES-3421 is not fixed in Drools 5.3.x. Possible solutions to fix JBRULES-3283: upgrade to SOA-P 5.3.1.GA test Drools and jBPM jars from SOA-P 5.3.1 as patch to SOA-P 5.3.0. Possible solution to fix JBRULES-3421: backport fix to Drools 5.3.x and include in BRMS-P 5.3.1 roll-up #1 (and SOA-P-5.3.1 roll-up #1) [note, that inclusion in BRMS-P 5.3.1 needs to be decided very quickly]
Julian, actually the "full" fix for JBRULES-3283 will be just in BRMS 5.3.1 Roll Up #1 - right? It is about our last comments on BUG 873846 - so if BRMS customer needs a fix about this, it will be there on Roll Up #1.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.