<div><br></div>    Wolfgang, <div><br></div><div>    The requirement for serializable classes even when not using persistence was a &quot;mistake&quot; made several versions ago and I believed it was fixed. What version of Drools are you using? If that is trunk, we need to fix it.</div>
<div><br></div><div>    Anyway, workaround: for count(), you can simply write &quot;count(1)&quot; instead of using the actual variable, anyway (yes, you can see requiring serializable there was dumb). :)</div><div><br></div>
<div>    Edson</div><div><br><div class="gmail_quote">2010/8/23 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
No, not knowingly :-) I&#39;m using the simplest possible setup for KnowledgeBase, KnowledgeBuilder, StatefulKnowledgeSession.<br><br>Why should accumulate/count effect persistence?<br><br>-W<br><br><br><div class="gmail_quote">

2010/8/23 Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com" target="_blank">TSwindells@nds.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">
<div><div></div><div class="h5">






<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">You’ve probably configured your system to be using persistence?</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">In which case what you are persisting needs to be serializable so that it can be persisted</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">Thomas</span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span></p>
<div style="border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;border-width:medium medium medium 1.5pt;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10pt" lang="EN-US">From:</span></b><span style="font-size:10pt" lang="EN-US"> <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>]
<b>On Behalf Of </b>Wolfgang Laun<br>
<b>Sent:</b> 23 August 2010 12:17<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> [rules-users] counting facts of a kind</span></p>
</div>
</div><div><div></div><div>
<p class="MsoNormal"> </p>
<p class="MsoNormal">As simple as it gets:<br>
<br>
rule countHigh<br>
when<br>
    $n : Number() from accumulate ( $sgc : StartGoalConn() count( $sgc ) )<br>
then<br>
    System.out.println( &quot;plain routes: &quot; + $n );<br>
end<br>
<br>
And yet, it fails:<br>
<br>
Exception in thread &quot;main&quot; org.drools.RuntimeDroolsException: java.lang.ClassCastException: rss.ixl.route.TrainStartGoalConn cannot be cast to java.io.Serializable<br>
<br>
Sure, adding &quot;implements Serializable&quot; to StartGoalConn fixes this. But why is this necessary?<br>
<br>
FYI, StartGoalConn is abstract superclass of TrainStartGoalConn - just in case this has some bearing on this issue.<br>
<br>
Best<br>
-W</p>
</div></div></div>
</div>
<br>
<hr>
<font size="1" color="Gray" face="Arial"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com" target="_blank">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data
 may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
</font>
</div>

<br></div></div><div class="im">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></div></blockquote></div><br>
<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>
</div>