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

ClassCastException when kcontainer.updateToVersion() with sliding window rule running (with fix for DROOLS-881 and DROOLS-883)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.3.0.CR2
    • 6.3.0.CR1
    • core engine
    • None
    • Hide

      Attached a reproducer:
      Unzip reproducer2.zip
      cd kjar1
      mvn clean install
      cd ../kjar2
      mvn clean install
      cd ../drools-mvn-main
      mvn test
      You may need 1 or 2 minutes to reproduce the issue with the reproducer.

      Show
      Attached a reproducer: Unzip reproducer2.zip cd kjar1 mvn clean install cd ../kjar2 mvn clean install cd ../drools-mvn-main mvn test You may need 1 or 2 minutes to reproduce the issue with the reproducer.
    • NEW
    • NEW

      When you call kcontainer.updateToVersion() while running sliding window rules, you will the following Exception.
      I tested it with master(6.4.0-SNAPSHOT), and I guess it includes the fix for DROOLS-881 and DROOLS-883. However the issue still occurs.

      Exception in thread "pool-23-thread-1" java.lang.ClassCastException: org.drools.core.reteoo.WindowNode$WindowMemory cannot be cast to org.drools.core.reteoo.PathMemory
      at org.drools.core.phreak.AddRemoveRule.addRule(AddRemoveRule.java:85)
      at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:190)
      at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:136)
      at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:102)
      at org.drools.core.impl.KnowledgeBaseImpl.addRule(KnowledgeBaseImpl.java:1521)
      at org.drools.core.impl.KnowledgeBaseImpl.addRule(KnowledgeBaseImpl.java:1501)
      at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileAllRules(KnowledgeBuilderImpl.java:966)
      at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildRules(CompositeKnowledgeBuilderImpl.java:256)
      at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:120)
      at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104)
      at org.drools.compiler.kie.builder.impl.KieContainerImpl.rebuildAll(KieContainerImpl.java:369)
      at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:207)
      at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:128)
      at com.sample.CallKjarTest$1.run(CallKjarTest.java:45)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

              mfusco@redhat.com Mario Fusco
              rhn-support-hfuruich Hisao Furuichi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: