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

Cannot create KieBase - StringIndexOutOfBounds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.33.0.Final, 7.34.0.Final, 7.35.0.Final, 7.36.0.Final, 7.37.0.Final, 7.38.0.Final, 7.39.0.Final, 7.40.0.Final
    • core engine
    • None
    • 2020 Week 31-33 (from Jul 27)
    • Hide

      Using one of the affected versions, try running the example rule above.

      Show
      Using one of the affected versions, try running the example rule above.
    • NEW
    • NEW

    Description

      Drls no longer built.

      Give the rule:

       

      package rules;
      
      import org.example.drools.model.*;
      
      import org.apache.commons.lang3.StringUtils;
      
      global java.util.Set controlSet;
      
      rule "will execute per each Measurement having ID color"
      no-loop
      when
       Measurement( id == "color", $colorVal : val );
      then
       controlSet.add($colorVal);
      end
      
      rule "will execute per each Measurement having ID color #2"
      no-loop
      when
       Measurement( !(StringUtils.isNotBlank(id)), $colorVal : val );
      then
       controlSet.add($colorVal);
      end
      
      rule "will execute per each Measurement having ID color #3"
      no-loop
      when
       Measurement( !(id != "color"), $colorVal : val );
      then
       controlSet.add($colorVal);
      end

      When the engine starts it throws:

      StringIndexOutOfBounds begin 0, end -1, length 18

      Commenting out the last rule, it works.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            cchiru Ciprian Chiru (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: