Description of problem: When a KieBase is defined in kmodule.xml in a way that it includes resources from other KieBase, and the included resources contain a DRL defining a fact, the KieBuilder fails with the following message: 2013-06-20 18:41:39,605 [main] ERROR Unable to build KieBaseModel:defaultKBase New declaration of org.drools.compiler.integrationtests.CancelFact can't declare new fields The declaration of CancelFact is located in one DRL file only. The same DRL file is used by both defined KieBases. Please see the attached pull request with reproducer for details. Version-Release number of selected component (if applicable): Drools 6.0.0-SNAPSHOT very likely Drools 6.0.0.Beta4 (not released yet) This worked fine with Drools 6.0.0.Beta3, so it seems to be a regression. How reproducible: Run the test case in attached pull request. Actual results: The KieBase does not compile. Expected results: The KieBase compiles, test succeeds.
Pull request with the reproducer: https://github.com/droolsjbpm/drools/pull/216
Adding TestBlocker because large number of tests failing during their initialization complicates regression testing.
Fixed by building each KieBase with a different ClassLoader,
*** Bug 980378 has been marked as a duplicate of this bug. ***
Verified on 6.0.0.Beta5.