Hello,
some days ago I implemented rules with a dicision table (5.0.1) and
everything works fine.
But suddenly I ran into a strange ArrayIndexOutOfBoundsException. I thought
my
decision table is the problem and so I tried to test with some simple tables
but I still
get the same error.
Here is the stacktrace:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at jxl.biff.StringHelper.getUnicodeString(StringHelper.java:155)
at jxl.biff.FormatRecord.<init>(FormatRecord.java:158)
at jxl.read.biff.WorkbookParser.parse(WorkbookParser.java:538)
at jxl.Workbook.getWorkbook(Workbook.java:253)
at jxl.Workbook.getWorkbook(Workbook.java:235)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:74)
at
org.drools.decisiontable.SpreadsheetCompiler.getRuleSheetListener(SpreadsheetCompiler.java:148)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:131)
at
org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:32)
at
org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:19)
at
org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:16)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:508)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:31)
This is the code the files get loaded with:
KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
DecisionTableConfiguration dtconf =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtconf.setInputType( DecisionTableInputType.XLS );
dtconf.setWorksheetName("Tables");
kBuilder.add(ResourceFactory.newClassPathResource(source),
ResourceType.DTABLE, dtconf);
This is the simple Test.xls, just with a package- and ruletable-declaration:
http://n3.nabble.com/forum/FileDownload.jtp?type=n&id=756101&name...
Test.xls
Regards,
Christian
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Strange-ArrayIndexOut...
Sent from the Drools - User mailing list archive at
Nabble.com.