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

Drools compiler failed to compile for LongBitMask class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • 7.45.0.Final, 7.71.0.Final
    • core engine
    • None
    • 2022 Week 23-25 (from Jun 6)
    • NEW
    • NEW
    • ---
    • ---

      The drool engine failed to compile rules during runtime in OSGi environment with the following errors:

      2022-06-13 04:55:37,658 [main] TRACE o.k.a.i.utils.ServiceDiscoveryImpl -  - Service org.drools.compiler.compiler.DecisionTableProvider is implemented by org.drools.decisiontable.DecisionTableProviderImpl@235b4c49
      2022-06-13 04:55:37,658 [main] TRACE o.k.a.i.utils.ServiceDiscoveryImpl -  - Service org.kie.api.concurrent.KieExecutors is implemented by org.drools.core.concurrent.ExecutorProviderImpl@a0825c1
      2022-06-13 04:55:37,658 [main] TRACE o.k.a.i.utils.ServiceDiscoveryImpl -  - Service org.kie.api.KieServices is implemented by org.drools.compiler.kie.builder.impl.KieServicesImpl@29b489a9
      2022-06-13 04:55:37,658 [main] TRACE o.k.a.i.utils.ServiceDiscoveryImpl -  - Service org.kie.api.internal.weaver.KieWeavers is implemented by org.kie.internal.services.KieWeaversImpl@79bc0ceb
      2022-06-13 04:55:39,867 [main] ERROR o.d.c.kie.builder.impl.KieProject -  - Unable to build KieBaseModel:rules
      Rule Compilation error : [Rule name='Condition_AN_465360352']
              com/abc/modules/def/de/rules/rules/Rule_Condition_AN_465360352670984543.java (7:1209) : org.drools.core.util.bitmask.LongBitMask cannot be resolved to a typeRule Compilation error : [Rule name='Condition_OD_464792487']
              com/abc/modules/def/de/rules/rules/Rule_Condition_OD_4647924872070301290.java (7:1130) : org.drools.core.util.bitmask.LongBitMask cannot be resolved to a typeRule Compilation error : [Rule name='Condition_ED_706918970']
              com/abc/modules/def/de/rules/rules/Rule_Condition_ED_7069189701302333658.java (7:1145) : org.drools.core.util.bitmask.LongBitMask cannot be resolved to a type 

       The root cause seems like due to missing import of OSGi package (org.drools.core.util.bitmask) in drools compiler https://github.com/kiegroup/drools/blob/7.x/drools-compiler/pom.xml#L179-L198

      The problem can be resolved by adding the below code into above pom.xml section:

      org.drools.core.util.bitmask;resolution:=optional, 

       
      Pull request of the change in https://github.com/kiegroup/drools/pull/4458

       

       

              mfusco@redhat.com Mario Fusco
              ctchew9775 Chai Teong Chew (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: