<br>&nbsp;&nbsp; Thanks for reporting. I opened a ticket for that.<br><br><a href="http://jira.jboss.com/jira/browse/JBRULES-1521">http://jira.jboss.com/jira/browse/JBRULES-1521</a><br><br>&nbsp;&nbsp;&nbsp; We will include the fix on 4.0.6.<br><br>
&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2008/3/20, siddhartha banik &lt;<a href="mailto:siddhartha.banik@gmail.com">siddhartha.banik@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>&nbsp;</div>
<div>Hi Group Members,<br>&nbsp;<br>In Drools 4.0.5 release most of the bugs with <strong>&quot;Working Memory serialization&quot;</strong> are fixed. But still the feature has few bugs. <br>&nbsp;<br>The bug scenario :<br>1. Create a rule Base &amp; Working Memory (Stateful Session).<br>

2. Assert some objects in Working Memory &amp; call fireAll()<br>3. Serialize both&nbsp; Rule Base &amp; Working Memory.<br>4. De Serialize Rule Base &amp; Working Memory.<br>5. Remove Pkg/rule from Rule Base.<br>6. Serialize both Rule Base &amp; Working Memory.<br>

7. De Serialize Rule Base &amp; Working Memory. ---------&gt;<strong> In this step Working Memory De Serialization fails with java.lang.ClassNotFoundException.<br></strong>8. Assert some more objects in Working Memory &amp; call fireAll()<br>

&nbsp;<br>I have tested the scenario using <strong>&quot;MarshallingTest.java&quot;</strong> from Drools Codebase. In the <strong>MarshallingTest.testSerializeAddRemove_NoClassDefFoundError()</strong> test case, <br>I have appended bellow mentioned code snippet at end:<br>

&nbsp;</div>
<div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ruleBase = (RuleBase) serializeIn( serializedRulebase );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session = ruleBase.newStatefulSession( new ByteArrayInputStream( serializedSession ) );&nbsp;&nbsp;&nbsp; <strong>//&nbsp; throws java.lang.ClassNotFoundException Exception<br>

</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; results = (List) session.getGlobal( &quot;results&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalFactHandle stilton5 = (InternalFactHandle) session.insert( new Cheese( &quot;stilton&quot;, 30 ) );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalFactHandle brie5 = (InternalFactHandle) session.insert( new Cheese( &quot;brie&quot;, 30 ) );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalFactHandle bob7 = (InternalFactHandle) session.insert( new Person( &quot;bob&quot;, 30 ) );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalFactHandle bob8 = (InternalFactHandle) session.insert( new Person( &quot;bob&quot;, 40 ) );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.fireAllRules();<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; assertEquals( 8,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; results.size() );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; assertEquals( bob7.getObject(),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; results.get( 6 ) );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; assertEquals( bob8.getObject(),<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; results.get( 7 ) );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serializedSession = null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serializedRulebase = null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serializedSession = serializeOut( session );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serializedRulebase = serializeOut( ruleBase );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.dispose();<br>&nbsp;<br>&nbsp;<br><strong>One more bug is:</strong>&nbsp; Can not serialize Working Memory if&nbsp; Rule contains <strong>Accumulate</strong> or <strong>Collect</strong> Conditional element. Because, both of them have nested static class &quot;<strong>AccumulateMemory</strong>&quot; &amp; &quot;<strong>CollectMemory</strong>&quot; respectively, which are not serializable.<br>

&nbsp;</p>
<p>We want to use Drools in our project with its <strong>&quot;Working Memory serialization&quot;</strong> feature to maintain state of Rule Engine between executions. So Fix of All bugs related to <strong>&quot;Working Memory serialization&quot;</strong> feature is very important for us. <br>

&nbsp;<br>&nbsp;<br>Thanks <br>Siddhartha<br></p></div>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>