<br>   The stack trace shows the problem is happening in a use of the &quot;after&quot; evaluator:<br><br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:321)<br>

<br>    So, the attached rule is not the source of the problem, although it might be the rule &quot;triggering&quot; the problem because of the event forwarding in the consequence. Remember that the After operator is supposed to work on events, java.util.Date, and long (for timestamps). Anything else will raise errors.<br>
<br>    Finally, on a different subject, you can simplify your consequence, as this:<br><br>WorkingMemoryEntryPoint eventsignaturestream = drools.getEntryPoint(&quot;EVENT SIGNATURE STREAM&quot;) ;<br>eventsignaturestream.insert($p);<br>
<br>   Is the same as:<br><br>entryPoints[&quot;EVENT SIGNATURE STREAM&quot;].insert( $p );<br><br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/11/9 Chetan Mahadev <span dir="ltr">&lt;<a href="mailto:mahadev.chetan@gmail.com">mahadev.chetan@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi I am getting the following error while inserting into the entrypoint.<br><br>rule &quot;Check if EligibleAlert is an Signature Event&quot;<br>
agenda-group &quot;enrichment&quot;<br>auto-focus true<br><br>no-loop true<br>
when<br>    $list : EventSignatureList();<br>    $p : EligibleAlert($a : alert, $a.eventSignatureProcessingStatus!=&quot;TRUE&quot; );<br>    eval((ifMatchesSyslog($list.getAllSyslogMnemonics(), $a)!=null)  )<br><br>then<br>

        try{<br>                WorkingMemoryEntryPoint eventsignaturestream = drools.getEntryPoint(&quot;EVENT SIGNATURE STREAM&quot;) ;<br>                eventsignaturestream.insert($p);<br>                } catch(Exception e)<br>

        {<br>            log.error(&quot;[EventSignatureRules] - exception in Check if EligibleAlert is an Signature Event alert[ids=&quot; + $p.getAlert().getId() + &quot;][error:&quot; + e.toString() + &quot;]&quot;);<br>

        }<br>end<br><br>And I am creating the session this way:<br><b><br>        knowledgeBaseConfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>        knowledgeBaseConfig.setOption( EventProcessingOption.STREAM );<br>

        kBase = KnowledgeBaseFactory.newKnowledgeBase( knowledgeBaseConfig );<br>        <br><br>        kBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());<br>        <br>        <br>        KnowledgeSessionConfiguration knowledgeSessionConfig =  KnowledgeBaseFactory.newKnowledgeSessionConfiguration();<br>

        ((SessionConfiguration) knowledgeSessionConfig).setClockType( ClockType.REALTIME_CLOCK );<br>          kBase.newStatefulKnowledgeSession(knowledgeSessionConfig,null);</b><br><br><br>I get the Following error when my rule fires:<br>

<br>2009-11-09 15:02:00,675 FATAL pool-2-thread-1 LogStream - java.lang.ClassCastException: org.drools.common.DefaultFactHandle cannot be cast to org.drools.common.EventFactHandle<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:321)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:116)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:112)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.DefaultBetaConstraints.isAllowedCachedRight(DefaultBetaConstraints.java:200)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:172)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:326)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:221)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:394)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1486)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:158)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:122)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:80)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:28)<br>2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at pnoc.alertProcessor.Rule_Check_if_EligibleAlert_is_an_Signature_Event_0.consequence(Rule_Check_if_EligibleAlert_is_an_Signature_Event_0.java:16)<br>

2009-11-09 15:02:00,676 FATAL pool-2-thread-1 LogStream -       at pnoc.alertProcessor.Rule_Check_if_EligibleAlert_is_an_Signature_Event_0ConsequenceInvoker.evaluate(Rule_Check_if_EligibleAlert_is_an_Signature_Event_0ConsequenceInvoker.java:24)<br>

<br>Pls help!<br><br><br>Regds<br><font color="#888888">Chetan<br>
</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>