[jboss-jira] [JBoss JIRA] (DROOLS-859) Incorrect packages in KieBase

Duncan Doyle (JIRA) issues at jboss.org
Fri Jul 24 07:29:05 EDT 2015


Duncan Doyle created DROOLS-859:
-----------------------------------

             Summary: Incorrect packages in KieBase
                 Key: DROOLS-859
                 URL: https://issues.jboss.org/browse/DROOLS-859
             Project: Drools
          Issue Type: Bug
          Components: core engine
    Affects Versions: 6.3.0.Beta2
         Environment: Mac OS X 10.10.3, Oracle JDK 1.7.0_79
            Reporter: Duncan Doyle
            Assignee: Mario Fusco


When loading a KieContainer from the classpath, my KieBase contains DRLs from the wrong package. It seems that the package names are incorrectly parsed.

See reproducer here: https://github.com/DuncanDoyle/drools-kmodule-packages-issue

Run {{mvn clean test}} to reproduce the problem

The reproducer has a {{kmodule.xml}} which defines a default KieBase that should contain the rule resources in the package "rules". The "src/main/resources" directory contains 3 folders, {{META-INF}}, {{rules}} and {{myrules}}. The latter 2 directories both contain a  DRL file with a single rule. The name of this rule is the same in both DRLs.

When running the test (which actually doesn't do much other than loading a KieSession, inserting a fact, firing rules and dispose), the test fails with the message that there are duplicate rule names. This is caused by the fact that the DRLs in both folders are loaded into the KieBase instead of just the DRL in the {{rules}} folder (as defined in the {{kmodule.xml}}).

When you change the {{myrules}} folder name to {{mrulesj}}, the test succeeds.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list