Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7071

Fix kie-karaf-itests failures because of poi version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.74.0.Final
    • 7.73.0.Final
    • integration
    • None
    • 2022 Week 29-31 (from Jul 18)
    • 2
    • NEW
    • NEW
    • ---
    • ---

      Currently kie-karaf-itests fails with several tests (KieCamelBlueprintCommandIntegrationTest, KieCamelBlueprintIntegrationTest, KieCamelBlueprintDTIntegrationTest ...). The root cause is

      Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Cound not create component instance for example-ksession
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:815) ~[?:?]
              at org.apache.camel.blueprint.BlueprintContainerRegistry.lookupByNameAndType(BlueprintContainerRegistry.java:54) ~[?:?]
              at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:56) ~[!/:2.24.0]
              at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) ~[!/:2.24.0]
              at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:82) ~[!/:2.24.0]
              at org.kie.camel.embedded.component.KieEmbeddedEndpoint.configure(KieEmbeddedEndpoint.java:139) ~[?:?]
              at org.kie.camel.embedded.component.KieEmbeddedEndpoint.<init>(KieEmbeddedEndpoint.java:104) ~[?:?]
              at org.kie.camel.embedded.component.KieComponent.createEndpoint(KieComponent.java:52) ~[?:?]
              at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:130) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:706) ~[!/:2.24.0]
              at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80) ~[!/:2.24.0]
              at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122) ~[!/:2.24.0]
              at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62) ~[!/:2.24.0]
              at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:569) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:530) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:240) ~[!/:2.24.0]
              at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1349) ~[!/:2.24.0]
              ... 25 more
      Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.CellValue.getCellType()Lorg/apache/poi/ss/usermodel/CellType;
              at org.drools.decisiontable.parser.xls.ExcelParser.getFormulaValue(ExcelParser.java:261) ~[?:?]
              at org.drools.decisiontable.parser.xls.ExcelParser.processSheet(ExcelParser.java:198) ~[?:?]
              at org.drools.decisiontable.parser.xls.ExcelParser.parseWorkbook(ExcelParser.java:126) ~[?:?]
              at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:105) ~[?:?]
              at org.drools.decisiontable.SpreadsheetCompiler.parseResource(SpreadsheetCompiler.java:136) ~[?:?]
              at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:120) ~[?:?]
              at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93) ~[?:?]
              at org.drools.decisiontable.DecisionTableProviderImpl.compileResource(DecisionTableProviderImpl.java:82) ~[?:?]
              at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:45) ~[?:?]
              at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource(DecisionTableFactory.java:35) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieBuilderImpl.packageNameFromDtable(KieBuilderImpl.java:436) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieBuilderImpl.packageNameFromAsset(KieBuilderImpl.java:412) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieBuilderImpl.packageNameForFile(KieBuilderImpl.java:390) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieBuilderImpl.isFileInKieBase(KieBuilderImpl.java:381) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieBuilderImpl.filterFileInKBase(KieBuilderImpl.java:359) ~[?:?]
              at org.drools.compiler.kie.builder.impl.AbstractKieProject.addFiles(AbstractKieProject.java:324) ~[?:?]
              at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:247) ~[?:?]
              at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216) ~[?:?]
              at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:193) ~[?:?]
              at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:205) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:475) ~[?:?]
              at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:439) ~[?:?]
              at org.kie.aries.blueprint.factorybeans.AbstractKieObjectsResolver.resolveKBase(AbstractKieObjectsResolver.java:51) ~[?:?]
              at org.kie.aries.blueprint.factorybeans.AbstractKieObjectsResolver.newStatelessSession(AbstractKieObjectsResolver.java:110) ~[?:?]
              at org.kie.aries.blueprint.factorybeans.KieSessionResolver.getSession(KieSessionResolver.java:89) ~[?:?]
              at org.kie.aries.blueprint.factorybeans.KieSessionResolver.init(KieSessionResolver.java:72) ~[?:?]
              at org.kie.aries.blueprint.namespace.KieObjectsInjector.afterInit(KieObjectsInjector.java:309) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcPostInit(BeanRecipe.java:623) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:705) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) ~[?:?]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_231]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) ~[?:?]
              at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360) ~[?:?]
              at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:338) ~[?:?]
              at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:152) ~[?:?]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:809) ~[?:?]
              at org.apache.camel.blueprint.BlueprintContainerRegistry.lookupByNameAndType(BlueprintContainerRegistry.java:54) ~[?:?]
              at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:56) ~[!/:2.24.0]
              at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) ~[!/:2.24.0]
              at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:82) ~[!/:2.24.0]
              at org.kie.camel.embedded.component.KieEmbeddedEndpoint.configure(KieEmbeddedEndpoint.java:139) ~[?:?]
              at org.kie.camel.embedded.component.KieEmbeddedEndpoint.<init>(KieEmbeddedEndpoint.java:104) ~[?:?]
              at org.kie.camel.embedded.component.KieComponent.createEndpoint(KieComponent.java:52) ~[?:?]
              at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:130) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:706) ~[!/:2.24.0]
              at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80) ~[!/:2.24.0]
              at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116) ~[!/:2.24.0]
              at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122) ~[!/:2.24.0]
              at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62) ~[!/:2.24.0]
              at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:569) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:530) ~[!/:2.24.0]
              at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:240) ~[!/:2.24.0]
              at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1349) ~[!/:2.24.0]
              ... 25 more
      

      The CellValue.getCellType() signature has been changed between Apache POI 3 and 4. The use of the method was introduced by

      https://issues.redhat.com/browse/DROOLS-7034
      https://github.com/kiegroup/drools/commit/60d380257fc

      We need to update karaf-features from POI 3 to POI 4 to keep up with drools' dependency.

      https://github.com/kiegroup/droolsjbpm-build-bootstrap/blob/main/pom.xml#L153

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: