Description of problem: ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler(); String drl = null; try{ InputStream csv = ResourceFactory.newClassPathResource("TableAnticipation.csv").getInputStream(); InputStream tpl = ResourceFactory.newClassPathResource("Anticipation.drt").getInputStream(); //Version csv drl = converter.compile(csv, tpl,InputType.CSV ,1, 1); //Version XLS //drl = converter.compile(csv, tpl,InputType.XLS, 2, 2); } catch (IOException e) { throw new IllegalArgumentException("Could not read spreadsheet or rules stream.", e); } works fine in BRMS 5.1.0, in 5.2.0 the NPE is thrown, see below Version-Release number of selected component (if applicable): JBoss BRMS 5.2.0 How reproducible: always Steps to Reproduce: 1. run attached example 2. 3. Actual results: java.lang.NullPointerException at org.jbpm.process.instance.ProcessRuntimeImpl.dispose(ProcessRuntimeImpl.java:384) at org.drools.common.AbstractWorkingMemory.dispose(AbstractWorkingMemory.java:1256) at org.drools.reteoo.ReteooStatefulSession.dispose(ReteooStatefulSession.java:179) at org.drools.template.parser.TemplateDataListener.finishSheet(TemplateDataListener.java:121) at org.drools.decisiontable.parser.csv.CsvParser.finishSheet(CsvParser.java:79) at org.drools.decisiontable.parser.csv.CsvParser.parseFile(CsvParser.java:64) at org.drools.decisiontable.ExternalSpreadsheetCompiler.compile(ExternalSpreadsheetCompiler.java:136) at org.drools.decisiontable.ExternalSpreadsheetCompiler.compile(ExternalSpreadsheetCompiler.java:164) at org.drools.decisiontable.ExternalSpreadsheetCompiler.compile(ExternalSpreadsheetCompiler.java:95) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:63) at com.sample.DroolsTest.main(DroolsTest.java:29) Expected results: processed file without exceptions being thrown like in 5.1.0 Additional info:
Created attachment 573684 [details] CSV Adding CSV used in example
Created attachment 573685 [details] template Adding DROOLS template
Created attachment 573686 [details] XLS Adding XLS used in exmaple
The provided test passes in master (Community 5.4.0.CR1).
Confirmed to work as expected in 5.3.x too. Setting to MODIFIED so QA are aware.
Hi, I tested with 5.2.0.Final (community) and the test with CSV and XLS works OK. Is there a particular version I need to try this with?
Created attachment 576973 [details] testing project Hi, I uploaded project that I used for testing. Run com.sample.DroolsTest2 class as Java Application. On Classpath I have SOA-P 5.2.0 which contains: Drools Exper (business rules engine) 5.2.0.BRMS
Confirming that community version 5.2.0.Final works as expected - no exception thrown BRMS-P 5.2.0.GA throws the exception as in the #1 comment I'd say it has been fixed somewhere between BRMS-P and 5.2.0.Final community version This should also be fixed in SOA-P 5.2.0 which has the same bug
Thanks much to Michael and Adam for the version validations. This issue is currently under discussion with SOA-PM to see if we can pull newer community bits for a BRMS 5.2 Roll up patch. If so, we will hopefully have a fix for 5.2. If not, we'll be sure to validate this use case against BRMS 5.3, which is currently in development. I'll update as we learn more.
Doug Palmer asked me to verify if this issue runs with the head of 5.2.x (because micheal is on PTO). There was suspicion that it is a regression from 5.2.0.Final to 5.2.2-SNAPSHOT. I did and this issue is not reproducible with 5.2.2-SNAPSHOT. I 've updated and build all of 5.2.x to make sure I got the latest 5.2.2.-SNAPSHOT. Both java main classes in the "testing project" run and neither produces a stacktrace. This does not explain why it fails on BRMS 5.2.x, but I presume the BRMS 5.2.x branch in not in sync with the 5.2.x branch (which is unlikely, as all changes have to go in project first).
Created attachment 578676 [details] Mavenized version of the reproducer that is easier to use (but it suceeds)
I've attached the mavenized version that I use.