Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-1453

External links from decision table to other XLS files are not handled correctly

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    Description

      Description of problem:
      Decision table is not correctly compiled when using links to external XLS files. See attached reproducer.

      I think the external link should not result in error even if it is not available (broken) -> the previous known (cached) value should be used.

      This is the regression from 5.3.1 where both available and not-available (broken) links worked.

      Full stacktrace:
      java.lang.RuntimeException: Could not resolve external workbook name 'home/psiroky/work/workspace/decisiontables-example-drools6/src/test/resources/definitions.xls'. Workbook environment has not been set up.
      at org.apache.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:89)
      at org.apache.poi.ss.formula.OperationEvaluationContext.getRef3DEval(OperationEvaluationContext.java:249)
      at org.apache.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:656)
      at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:527)
      at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:288)
      at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:230)
      at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue(HSSFFormulaEvaluator.java:354)
      at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate(HSSFFormulaEvaluator.java:185)
      at org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.java:145)
      at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:79)
      at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93)
      at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:72)
      at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:37)
      at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:20)
      at org.drools.compiler.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:15)
      at org.drools.compiler.compiler.PackageBuilder.decisionTableToPackageDescr(PackageBuilder.java:461)
      at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:348)
      at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:84)
      at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:75)
      at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:140)
      at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39)
      at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieModule(KieBuilderImpl.java:207)
      at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:160)
      at org.kie.internal.utils.KieHelper.build(KieHelper.java:25)
      at org.jboss.qa.brms.dt.example.CreateKBaseFromDTTest.createKBase(CreateKBaseFromDTTest.java:18)
      at org.jboss.qa.brms.dt.example.CreateKBaseFromDTTest.testCreateKBasefromDT(CreateKBaseFromDTTest.java:11)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment$WorkbookNotFoundException: Could not resolve external workbook name 'home/psiroky/work/workspace/decisiontables-example-drools6/src/test/resources/definitions.xls'. Workbook environment has not been set up.
      at org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.getWorkbookEvaluator(CollaboratingWorkbooksEnvironment.java:161)
      at org.apache.poi.ss.formula.WorkbookEvaluator.getOtherWorkbookEvaluator(WorkbookEvaluator.java:181)
      at org.apache.poi.ss.formula.OperationEvaluationContext.createExternSheetRefEvaluator(OperationEvaluationContext.java:87)
      ... 48 more

      Version-Release number of selected component (if applicable):
      6.0.0-SNAPSHOT(2013-05-27)

      How reproducible:
      Always

      Steps to Reproduce:
      1. Update the link (cell C7) to definitions.xls in sample.xls.
      2. Run the attached reproducer (mvn test)

      Actual results:
      Exception when compiling the XLS file.

      Expected results:
      Successful compilation.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            psiroky_jira Petr Široký (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson
            Petr Široký Petr Široký
            Petr Široký Petr Široký
            Michael Anstis, Rajesh Rajasekaran

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty