Bug 1195125

Summary: Reloading KJAR which contains DSL and RDSLR via KieScanner fails
Product: [Retired] JBoss BRMS Platform 6 Reporter: Mario Fusco <mfusco>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Tibor Zimanyi <tzimanyi>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: etirelli, mfusco, tzimanyi
Target Milestone: ER6   
Target Release: 6.1.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 18:34:48 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:
Embargoed:

Description Mario Fusco 2015-02-23 07:44:18 UTC
When using the KieScanner to reload a KJAR with a DSL and RDSLR, reloading fails due to that the compiler is unable to find mappings for the language in the RDSLR.

This is the error I get in my reproducer:

2015-02-18 00:45:02,764 [ERROR] [main] [org.drools.compiler.kie.builder.impl.KieContainerImpl] ERROR Unable to update KieBase: KBase1 to release org.kie:scanner-test:1.0-SNAPSHOT
[7] No mapping entries for expanding: There is a SimpleFact
[7] Unable to expand: There is a SimpleFact
[8] No mapping entries for expanding: -with id "2"
[8] Unable to expand: -with id "2"
[10] No mapping entries for expanding: Print "Found a simple fact with id 2."
[10] Unable to expand: Print "Found a simple fact with id 2."
[7,7]: [ERR 102] Line 7:7 mismatched input 'is' in rule "bla"

Reproducer project can be found here: https://github.com/DuncanDoyle/brms-kjar-with-dsl-kiescanner

Just clone the repo and run 'mvn clean test'.

Note that the reproducer creates the first KJAR, runs test, and then creates the second KJAR. Compilation of the second KJAR fails. When you alter the test to only load the second KJAR, everything works fine.

Comment 3 jvahala 2015-03-13 11:43:35 UTC
Mario, 

I've run 'mvn clean test' on your reproducer and got this exception: 

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.251 sec <<< FAILURE!
checkIncrementalCompilation(org.jboss.ddoyle.rules.RulesTest)  Time elapsed: 4.194 sec  <<< FAILURE!
java.lang.AssertionError: One rule should have fired. expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:555)
	at org.jboss.ddoyle.rules.RulesTest.runTest(RulesTest.java:78)
	at org.jboss.ddoyle.rules.RulesTest.checkIncrementalCompilation(RulesTest.java:65)

do you know anything about it?

Comment 4 Mario Fusco 2015-03-13 17:00:09 UTC
I rerun that test against both master and 6.2.x branches and it works for me. Are you sure you updated the dependencies versions in the pom file?

Comment 5 Tibor Zimanyi 2015-03-16 16:33:27 UTC
Verified by running reproducer with dependencies changed to version 6.2.0.Final-redhat-2.