[jboss-jira] [JBoss JIRA] (DROOLS-1382) "No RuleTable cells in spreadsheet"

John Dunning (JIRA) issues at jboss.org
Fri Dec 16 18:45:00 EST 2016


    [ https://issues.jboss.org/browse/DROOLS-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13339862#comment-13339862 ] 

John Dunning edited comment on DROOLS-1382 at 12/16/16 6:44 PM:
----------------------------------------------------------------

*I have resolved this as follows*

Using Intellij

navigated to src/main/resources 

added the rule folder that contains all the rules by right clicking and selecting new Directory brnc2.rules

added all the rules into this folder.  All compiles fine until I add the templates and then No RuleTable Error

Now, delete the folder and go back and right click and select New Directory brnc2
then repeat and select new Directory rules

now add all the rules into this folder (still displayed as brnc2.rules) and now it works with the templates as well
--

In summary 

- Intellij displays brnc2.rules and brnc2/rules both as brnc2.rules in the resources folder 

- Drools resolves all the other files except template-data.xls using a package structure so brnc2.rules will work

Drools does not see brnc2.rules/template-data.xls as a template data file, and indeed it cannot be found when Drools looks for template data.

It does, however find it when it is considering Decision Tables and so it tries to compile it as a decision table

If Drools reported when it could not find template data files, and threw an exception at that point - I guess that would resolve the problem for other users




was (Author: jgdunning):
*I have resolved this as follows*

Using Intellij

navigated to src/main/resources 

added the rule folder that contains all the rules by right clicking and selecting new Directory brnc2.rules

added all the rules into this folder.  All compiles fine until I add the templates and then No RuleTable Error

Now, delete the folder and go back and right click and select New Directory brnc2
then repeat and select new Directory rules

now add all the rules into this folder (still displayed as brnc2.rules) and now it works with the templates as well
--

In summary 

- Intellij displays brnc2.rules and brnc2/rules both as brnc2.rules in the resources folder 

- Drools resolves all the other files except template-data.xls using a package structure so brnc2.rules will work

However, the Template-Data.xls is not resolved by package and so the folder brnc2.rules is not the same as brnc2/rules and the template-data file cannot be found

Drools does not see brnc2.rules/template-data.xls as a template data file, and indeed it cannot be found when Drools looks for template data.

It does, however find it when it is considering Decision Tables and so it tries to compile it as a decision table

If Drools reported when it could not find template data files, and threw an exception at that point - I guess that would resolve the problem for other users



> "No RuleTable cells in spreadsheet"
> -----------------------------------
>
>                 Key: DROOLS-1382
>                 URL: https://issues.jboss.org/browse/DROOLS-1382
>             Project: Drools
>          Issue Type: Bug
>          Components: decision tables
>    Affects Versions: 6.3.0.Final, 6.5.0.Final
>         Environment: OSX 10.12
> Excel for Mac
> Drools 6.3.0.Final and Drools 6.5.0.Final
> Intellij IDEA  Ultimate 2016.1
> second machine  Intellij IDEA CE 2016.2
>            Reporter: John Dunning
>            Assignee: Mario Fusco
>            Priority: Blocker
>
> Mac OSX Drools 6.3.0.Final and recreated in Drools 6.5.0.Final
> Checked out the Drools6.3.0 example code, and also example code from Mastering Drools 6 book for RuleTemplates using spreadsheets as template data.
> Both projects compile and work in their own environment.
> Replicated similar for a Government Project and KnowledgeBase compilation fails with "No Ruletable cells in Spreadsheet".
> This ruleset is one ruleset in a multi-ruleset project that is configured using kmodule.xml.  Other rulesets include DRL and Decision Tables.
> The rules for this ruleset are in the same package in src/main/resources of a project that also includes all the executable code.  The fact model is also included in the executable code. Created an excel spreadsheet using Excel for Mac, and created the DRT file. The rules also include a DRL file.  Got the "No Ruletable cells in Spreadsheet" error when building the knowledge base. 
> Removed the DRL file and the KnowledgeBase built.  Put the DRL file back and the KnowledgeBase still built.
> Copied the project and the problem recurred.
> Created separate projects for each ruleset - each with its own kmodule.xml.  Each ruleset is a Maven Module in a Maven Project.  This ruleset contains only one DRT, one DRL and and XLS with data only.  It also contains java code for one fact.
> Cannot create a KnowledgeBase from this ruleset even when dependencies for all other rulesets are commented out.  None of the other rulesets use templates but they do use decision tables, DRL files and have facts specific to the ruleset.
> Moved the RuleSet from a Maven Module to a separate Maven Project.  Problem still recurred.  Separated the Fact Model (single fact) into a separate Maven Project.  Problem still recurred.
> Wondered if it may be a issue with Excel for Mac so copied the xls and DRT files from both Drools 6.3 examples and Mastering Drools examples and neither compiles when copied and pasted into a new project - same error  "No Ruletable cells in Spreadsheet".
> Moved Drools to 6.5.0.final and problem recurred
> IDE - Intellij IDEA Ultimate 2016.1 
> second machine
> Mac OSX Drools 6.3.0.Final and recreated in Drools 6.5.0.Final
> I can be contacted for more information and/or an example project that replicates the problem.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list