Bug 976498 - KieBase including resources from other KieBase fails to compile when it declares a fact
Summary: KieBase including resources from other KieBase fails to compile when it decla...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
: 980378 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-20 16:57 UTC by Marek Winkler
Modified: 2014-08-06 20:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:17:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Winkler 2013-06-20 16:57:10 UTC
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.

Comment 1 Marek Winkler 2013-06-20 17:00:04 UTC
Pull request with the reproducer: https://github.com/droolsjbpm/drools/pull/216

Comment 2 Marek Winkler 2013-07-01 15:16:20 UTC
Adding TestBlocker because large number of tests failing during their initialization complicates regression testing.

Comment 3 Mario Fusco 2013-07-02 09:09:13 UTC
Fixed by building each KieBase with a different ClassLoader,

Comment 4 Marek Winkler 2013-07-02 11:12:48 UTC
*** Bug 980378 has been marked as a duplicate of this bug. ***

Comment 5 Marek Winkler 2013-08-08 14:55:49 UTC
Verified on 6.0.0.Beta5.


Note You need to log in before you can comment on or make changes to this bug.