[jboss-jira] [JBoss JIRA] (DROOLS-930) ClassCastException after segment split during incremental compilation

RH Bugzilla Integration (JIRA) issues at jboss.org
Thu Nov 19 10:59:00 EST 2015


    [ https://issues.jboss.org/browse/DROOLS-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130962#comment-13130962 ] 

RH Bugzilla Integration commented on DROOLS-930:
------------------------------------------------

Mario Fusco <mfusco at redhat.com> changed the Status of [bug 1273087|https://bugzilla.redhat.com/show_bug.cgi?id=1273087] from ASSIGNED to MODIFIED

> ClassCastException after segment split during incremental compilation
> ---------------------------------------------------------------------
>
>                 Key: DROOLS-930
>                 URL: https://issues.jboss.org/browse/DROOLS-930
>             Project: Drools
>          Issue Type: Bug
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>             Fix For: 6.4.x
>
>
> A segment split during an incremental compilation as in the following test case 
> {code}
>     @Test
>     public void testSegmentSplitOnIncrementalCompilation() throws Exception {
>         String drl =
>                 "import " + Person.class.getCanonicalName() + "\n" +
>                 "rule R1 when\n" +
>                 "  $s : String()" +
>                 "  Person( name == $s ) \n" +
>                 "then\n" +
>                 "  System.out.println(\"Triggered: R1\");\n" +
>                 "end\n" +
>                 "rule R2 when\n" +
>                 "  $s : String()" +
>                 "  Person( name == $s ) \n" +
>                 "then\n" +
>                 "  System.out.println(\"Triggered: R2\");\n" +
>                 "end\n" +
>                 "rule R3 when\n" +
>                 "  $s : String()" +
>                 "  Person( name != $s ) \n" +
>                 "then\n" +
>                 "  System.out.println(\"Triggered: R3\");\n" +
>                 "end\n";
>         KieServices ks = KieServices.Factory.get();
>         ReleaseId releaseId1 = ks.newReleaseId("org.kie", "test-upgrade", "1.1.1");
>         KieModule km = createAndDeployJar(ks, releaseId1);
>         KieContainer kc = ks.newKieContainer(km.getReleaseId());
>         KieSession ksession = kc.newKieSession();
>         kc.updateToVersion(releaseId1);
>         ksession.insert(new Person("John", 26));
>         ksession.insert( "John" );
>         ksession.fireAllRules();
>         ReleaseId releaseId2 = ks.newReleaseId("org.kie", "test-upgrade", "1.1.2");
>         km = createAndDeployJar(ks, releaseId2, drl);
>         kc.updateToVersion(releaseId2);
>         ksession.fireAllRules();
>     }
> {code}
> may cause the following ClassCastException during the subsequent network evaluation
> {code}
> java.lang.ClassCastException: org.drools.core.reteoo.RuleTerminalNode cannot be cast to org.drools.core.reteoo.LeftInputAdapterNode
> 	at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:99)
> 	at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)
> 	at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73)
> 	at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:978)
> 	at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1292)
> 	at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1294)
> 	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1281)
> 	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1260)
> 	at org.drools.compiler.integrationtests.IncrementalCompilationTest.testSegmentSplit(IncrementalCompilationTest.java:2001)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list