Array index out of range

141 views
Skip to first unread message

Jeff Sanders

unread,
Nov 2, 2011, 4:02:22 PM11/2/11
to OpenRules
Has anyone overcome the following error, it occurs when OpenRules is
parsing the Excel sheet with the edit check rules for my project.

I have three tabs of rules, the rules in the first two tabs are fine,
all the ones in the third tab have the following error.

I can't see any format diff that stands out.


Exception in thread "main" org.openl.syntax.SyntaxErrorException:
Error: Array index out of range: 3 :
java.lang.ArrayIndexOutOfBoundsException
at file:src/main/resources/DRVSEditCheckRules.xls?
sheet=121-131&range=B5:I11&openl=
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 3
at com.openrules.table.GridTableRows.<init>(GridTableRows.java:26)
at com.openrules.table.LogicalTable.getRows(LogicalTable.java:59)
at
com.openrules.table.LogicalTable.getLogicalHeight(LogicalTable.java:
106)
at com.openrules.dt.ProxyDTLoader.load(ProxyDTLoader.java:169)
at
com.openrules.lang.xls.binding.ProxyDecisionTableMethodBoundNode.finalizeBind(ProxyDecisionTableMethodBoundNode.java:
108)
at com.openrules.lang.xls.XlsBinder.bindInternal(XlsBinder.java:220)
at com.openrules.lang.xls.XlsBinder.bind(XlsBinder.java:131)
at com.openrules.lang.xls.XlsBinder.bind(XlsBinder.java:102)
at com.openrules.lang.xls.XlsBinder.bind(XlsBinder.java:72)
at org.openl.OpenL.compileModule(OpenL.java:238)
at com.openrules.ruleengine.RuleEngine.<init>(RuleEngine.java:61)
at
com.openrules.ruleengine.OpenRulesEngine.initialize(OpenRulesEngine.java:
231)
at
com.openrules.ruleengine.OpenRulesEngine.<init>(OpenRulesEngine.java:
151)
at
com.openrules.ruleengine.OpenRulesEngine.<init>(OpenRulesEngine.java:
158)
at com.openrules.ruleengine.Decision.<init>(Decision.java:24)
at
gov.doleta.edrvs.rules.DRVSRulesMain.processTheRecords(DRVSRulesMain.java:
61)
at gov.doleta.edrvs.rules.DRVSRulesMain.main(DRVSRulesMain.java:203)

support

unread,
Nov 2, 2011, 11:55:13 PM11/2/11
to OpenRules
Jeff,

When you use templates, the number of columns inside the derived rules
table should be exactly the same as in the template. In your situation
you created a RuleFamily with a Condition that is expected two sub-
columns: one for an operator and one for a value. By some reason your
condition has 3 columns but you merged first two columns, so they look
like two columns. Please un-merge and remove one unnecessary column
and your rule family should work fine.

We agree that OpenRules should catch such situations and produce much
friendlier message (or even allow such "hidden" merge). We will try to
improve it in the next release.

Thank you, and let us know if it fixes your problem.

OpenRules Support

JSS

unread,
Nov 3, 2011, 8:43:27 AM11/3/11
to open...@googlegroups.com
WOw thanks, I hadn't noticed that. Great find.

Thanks Again

Jeff Sanders
Reply all
Reply to author
Forward
0 new messages